Share via


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

Parameters

semanticModel
SemanticModel

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

position
Int32

A position in the source code (context).

format
SymbolDisplayFormat

Formatting rules - null implies SymbolDisplayFormat.MinimallyQualifiedFormat.

Returns

A read-only array of string parts.

Applies to