Compartir a través de


SymbolDisplay Class

Definition

Displays a symbol in the C# style.

public ref class SymbolDisplay abstract sealed
public static class SymbolDisplay
type SymbolDisplay = class
Public Class SymbolDisplay
Inheritance
SymbolDisplay

Methods

FormatLiteral(Char, Boolean)

Returns a C# character literal with the given value.

FormatLiteral(String, Boolean)

Returns a C# string literal with the given value.

FormatPrimitive(Object, Boolean, Boolean)

Returns a string representation of an object of primitive type.

ToDisplayParts(ISymbol, SymbolDisplayFormat)

Convert a symbol to an array of string parts, each of which has a kind. Useful for colorizing the display string.

ToDisplayParts(ITypeSymbol, NullableAnnotation, SymbolDisplayFormat)
ToDisplayParts(ITypeSymbol, NullableFlowState, SymbolDisplayFormat)
ToDisplayString(ISymbol, SymbolDisplayFormat)

Displays a symbol in the C# style, based on a SymbolDisplayFormat.

ToDisplayString(ITypeSymbol, NullableAnnotation, SymbolDisplayFormat)
ToDisplayString(ITypeSymbol, NullableFlowState, SymbolDisplayFormat)
ToMinimalDisplayParts(ISymbol, SemanticModel, Int32, SymbolDisplayFormat)

Convert a symbol to an array of string parts, each of which has a kind. Useful for colorizing the display string.

ToMinimalDisplayParts(ITypeSymbol, NullableAnnotation, SemanticModel, Int32, SymbolDisplayFormat)
ToMinimalDisplayParts(ITypeSymbol, NullableFlowState, SemanticModel, Int32, SymbolDisplayFormat)
ToMinimalDisplayString(ISymbol, SemanticModel, Int32, SymbolDisplayFormat)

Displays a symbol in the C# style, based on a SymbolDisplayFormat. Based on the context, qualify type and member names as little as possible without introducing ambiguities.

ToMinimalDisplayString(ITypeSymbol, NullableAnnotation, SemanticModel, Int32, SymbolDisplayFormat)
ToMinimalDisplayString(ITypeSymbol, NullableFlowState, SemanticModel, Int32, SymbolDisplayFormat)

Applies to

See also