SymbolDisplay.ToMinimalDisplayString 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ToMinimalDisplayString(ISymbol, SemanticModel, Int32, SymbolDisplayFormat)
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
根據 SymbolDisplayFormat ,以 C# 樣式顯示符號。 根據內容,請盡可能限定類型和成員名稱,而不會引入模棱兩可的情況。
public static string ToMinimalDisplayString (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.SymbolDisplayFormat format = default);
public static string ToMinimalDisplayString (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.SymbolDisplayFormat? format = default);
static member ToMinimalDisplayString : Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.SemanticModel * int * Microsoft.CodeAnalysis.SymbolDisplayFormat -> string
Public Shared Function ToMinimalDisplayString (symbol As ISymbol, semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String
參數
- symbol
- ISymbol
要顯示的符號。
- semanticModel
- SemanticModel
顯示符號之內容的語意資訊。
- position
- Int32
或 semanticModel
內 SyntaxTree 的位置。
- format
- SymbolDisplayFormat
要套用的格式設定選項。 如果傳遞 null, CSharpErrorMessageFormat 將會使用 。
傳回
可向使用者顯示的格式化字串。
備註
傳回值不預期為語法有效的 C# 。
適用於
ToMinimalDisplayString(ITypeSymbol, NullableAnnotation, SemanticModel, Int32, SymbolDisplayFormat)
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
public static string ToMinimalDisplayString (Microsoft.CodeAnalysis.ITypeSymbol symbol, Microsoft.CodeAnalysis.NullableAnnotation nullableAnnotation, Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.SymbolDisplayFormat format = default);
public static string ToMinimalDisplayString (Microsoft.CodeAnalysis.ITypeSymbol symbol, Microsoft.CodeAnalysis.NullableAnnotation nullableAnnotation, Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.SymbolDisplayFormat? format = default);
static member ToMinimalDisplayString : Microsoft.CodeAnalysis.ITypeSymbol * Microsoft.CodeAnalysis.NullableAnnotation * Microsoft.CodeAnalysis.SemanticModel * int * Microsoft.CodeAnalysis.SymbolDisplayFormat -> string
Public Shared Function ToMinimalDisplayString (symbol As ITypeSymbol, nullableAnnotation As NullableAnnotation, semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String
參數
- symbol
- ITypeSymbol
- nullableAnnotation
- NullableAnnotation
- semanticModel
- SemanticModel
- position
- Int32
- format
- SymbolDisplayFormat
傳回
適用於
ToMinimalDisplayString(ITypeSymbol, NullableFlowState, SemanticModel, Int32, SymbolDisplayFormat)
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
- Source:
- SymbolDisplay.cs
public static string ToMinimalDisplayString (Microsoft.CodeAnalysis.ITypeSymbol symbol, Microsoft.CodeAnalysis.NullableFlowState nullableFlowState, Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.SymbolDisplayFormat format = default);
public static string ToMinimalDisplayString (Microsoft.CodeAnalysis.ITypeSymbol symbol, Microsoft.CodeAnalysis.NullableFlowState nullableFlowState, Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.SymbolDisplayFormat? format = default);
static member ToMinimalDisplayString : Microsoft.CodeAnalysis.ITypeSymbol * Microsoft.CodeAnalysis.NullableFlowState * Microsoft.CodeAnalysis.SemanticModel * int * Microsoft.CodeAnalysis.SymbolDisplayFormat -> string
Public Shared Function ToMinimalDisplayString (symbol As ITypeSymbol, nullableFlowState As NullableFlowState, semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String
參數
- symbol
- ITypeSymbol
- nullableFlowState
- NullableFlowState
- semanticModel
- SemanticModel
- position
- Int32
- format
- SymbolDisplayFormat