Delen via


ITypeSymbol.ToMinimalDisplayParts Method

Definition

Convert a symbol to an array of string parts, each of which has a kind. May be tailored to a specific location in the source code. Useful for colorizing the display string.

public System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SymbolDisplayPart> ToMinimalDisplayParts (Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.NullableFlowState topLevelNullability, int position, Microsoft.CodeAnalysis.SymbolDisplayFormat format = default);
public System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SymbolDisplayPart> ToMinimalDisplayParts (Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.NullableFlowState topLevelNullability, int position, Microsoft.CodeAnalysis.SymbolDisplayFormat? format = default);
abstract member ToMinimalDisplayParts : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.NullableFlowState * int * Microsoft.CodeAnalysis.SymbolDisplayFormat -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SymbolDisplayPart>
Public Function ToMinimalDisplayParts (semanticModel As SemanticModel, topLevelNullability As NullableFlowState, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart)

Parameters

semanticModel
SemanticModel

Binding information (for determining names appropriate to the context).

topLevelNullability
NullableFlowState

The top-level nullability to use for formatting.

position
Int32

A position in the source code (context).

format
SymbolDisplayFormat

Formatting rules - null implies MinimallyQualifiedFormat

Returns

A read-only array of string parts.

Applies to