Class SymbolDisplay
Inherited Members
Namespace: Microsoft.CodeAnalysis.CSharp
Assembly: Microsoft.CodeAnalysis.CSharp.dll
Syntax
public static class SymbolDisplay
Methods
FormatLiteral(char, bool)
Declaration
public static string FormatLiteral(char c, bool quote)
Parameters
| Type | Name | Description |
|---|---|---|
| char | c | |
| bool | quote |
Returns
| Type | Description |
|---|---|
| string |
FormatLiteral(string, bool)
Declaration
public static string FormatLiteral(string value, bool quote)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | |
| bool | quote |
Returns
| Type | Description |
|---|---|
| string |
FormatPrimitive(object, bool, bool)
Declaration
public static string FormatPrimitive(object obj, bool quoteStrings, bool useHexadecimalNumbers)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | |
| bool | quoteStrings | |
| bool | useHexadecimalNumbers |
Returns
| Type | Description |
|---|---|
| string |
ToDisplayParts(ISymbol, SymbolDisplayFormat?)
Declaration
public static ImmutableArray<SymbolDisplayPart> ToDisplayParts(ISymbol symbol, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ISymbol | symbol | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| ImmutableArray<SymbolDisplayPart> |
ToDisplayParts(ITypeSymbol, NullableAnnotation, SymbolDisplayFormat?)
Declaration
public static ImmutableArray<SymbolDisplayPart> ToDisplayParts(ITypeSymbol symbol, NullableAnnotation nullableAnnotation, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeSymbol | symbol | |
| NullableAnnotation | nullableAnnotation | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| ImmutableArray<SymbolDisplayPart> |
ToDisplayParts(ITypeSymbol, NullableFlowState, SymbolDisplayFormat?)
Declaration
public static ImmutableArray<SymbolDisplayPart> ToDisplayParts(ITypeSymbol symbol, NullableFlowState nullableFlowState, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeSymbol | symbol | |
| NullableFlowState | nullableFlowState | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| ImmutableArray<SymbolDisplayPart> |
ToDisplayString(ISymbol, SymbolDisplayFormat?)
Declaration
public static string ToDisplayString(ISymbol symbol, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ISymbol | symbol | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| string |
ToDisplayString(ITypeSymbol, NullableAnnotation, SymbolDisplayFormat?)
Declaration
public static string ToDisplayString(ITypeSymbol symbol, NullableAnnotation nullableAnnotation, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeSymbol | symbol | |
| NullableAnnotation | nullableAnnotation | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| string |
ToDisplayString(ITypeSymbol, NullableFlowState, SymbolDisplayFormat?)
Declaration
public static string ToDisplayString(ITypeSymbol symbol, NullableFlowState nullableFlowState, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeSymbol | symbol | |
| NullableFlowState | nullableFlowState | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| string |
ToMinimalDisplayParts(ISymbol, SemanticModel, int, SymbolDisplayFormat?)
Declaration
public static ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ISymbol | symbol | |
| SemanticModel | semanticModel | |
| int | position | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| ImmutableArray<SymbolDisplayPart> |
ToMinimalDisplayParts(ITypeSymbol, NullableAnnotation, SemanticModel, int, SymbolDisplayFormat?)
Declaration
public static ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ITypeSymbol symbol, NullableAnnotation nullableAnnotation, SemanticModel semanticModel, int position, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeSymbol | symbol | |
| NullableAnnotation | nullableAnnotation | |
| SemanticModel | semanticModel | |
| int | position | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| ImmutableArray<SymbolDisplayPart> |
ToMinimalDisplayParts(ITypeSymbol, NullableFlowState, SemanticModel, int, SymbolDisplayFormat?)
Declaration
public static ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ITypeSymbol symbol, NullableFlowState nullableFlowState, SemanticModel semanticModel, int position, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeSymbol | symbol | |
| NullableFlowState | nullableFlowState | |
| SemanticModel | semanticModel | |
| int | position | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| ImmutableArray<SymbolDisplayPart> |
ToMinimalDisplayString(ISymbol, SemanticModel, int, SymbolDisplayFormat?)
Declaration
public static string ToMinimalDisplayString(ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ISymbol | symbol | |
| SemanticModel | semanticModel | |
| int | position | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| string |
ToMinimalDisplayString(ITypeSymbol, NullableAnnotation, SemanticModel, int, SymbolDisplayFormat?)
Declaration
public static string ToMinimalDisplayString(ITypeSymbol symbol, NullableAnnotation nullableAnnotation, SemanticModel semanticModel, int position, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeSymbol | symbol | |
| NullableAnnotation | nullableAnnotation | |
| SemanticModel | semanticModel | |
| int | position | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| string |
ToMinimalDisplayString(ITypeSymbol, NullableFlowState, SemanticModel, int, SymbolDisplayFormat?)
Declaration
public static string ToMinimalDisplayString(ITypeSymbol symbol, NullableFlowState nullableFlowState, SemanticModel semanticModel, int position, SymbolDisplayFormat? format = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeSymbol | symbol | |
| NullableFlowState | nullableFlowState | |
| SemanticModel | semanticModel | |
| int | position | |
| SymbolDisplayFormat | format |
Returns
| Type | Description |
|---|---|
| string |