Document.TryGetSemanticModel(SemanticModel) 方法

定義

如果模型已經計算且仍然快取,則取得本檔的目前語意模型。 在幾乎所有情況下,您應該呼叫 GetSemanticModelAsync(CancellationToken) ,視需要計算語意模型。

public:
 bool TryGetSemanticModel([Runtime::InteropServices::Out] Microsoft::CodeAnalysis::SemanticModel ^ % semanticModel);
public bool TryGetSemanticModel (out Microsoft.CodeAnalysis.SemanticModel semanticModel);
public bool TryGetSemanticModel (out Microsoft.CodeAnalysis.SemanticModel? semanticModel);
member this.TryGetSemanticModel : SemanticModel -> bool
Public Function TryGetSemanticModel (ByRef semanticModel As SemanticModel) As Boolean

參數

semanticModel
SemanticModel

傳回

適用於