CSharpExtensions.TryGetSpeculativeSemanticModelForMethodBody 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
TryGetSpeculativeSemanticModelForMethodBody(SemanticModel, Int32, BaseMethodDeclarationSyntax, SemanticModel) |
取得與這個原始程式碼中未出現之方法主體相關聯的 SemanticModel 物件。
假設 |
TryGetSpeculativeSemanticModelForMethodBody(SemanticModel, Int32, AccessorDeclarationSyntax, SemanticModel) |
取得與這個原始程式碼中未出現之方法主體相關聯的 SemanticModel 物件。
假設 |
TryGetSpeculativeSemanticModelForMethodBody(SemanticModel, Int32, BaseMethodDeclarationSyntax, SemanticModel)
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
取得與這個原始程式碼中未出現之方法主體相關聯的 SemanticModel 物件。
假設 position
必須位於這個 SemanticModel 根語法節點的現有方法主體內。
在這個現有方法主體內宣告的區域變數和標籤,不會被視為在已推斷的方法主體範圍內。
public:
[System::Runtime::CompilerServices::Extension]
static bool TryGetSpeculativeSemanticModelForMethodBody(Microsoft::CodeAnalysis::SemanticModel ^ semanticModel, int position, Microsoft::CodeAnalysis::CSharp::Syntax::BaseMethodDeclarationSyntax ^ method, [Runtime::InteropServices::Out] Microsoft::CodeAnalysis::SemanticModel ^ % speculativeModel);
public static bool TryGetSpeculativeSemanticModelForMethodBody (this Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.CSharp.Syntax.BaseMethodDeclarationSyntax method, out Microsoft.CodeAnalysis.SemanticModel speculativeModel);
public static bool TryGetSpeculativeSemanticModelForMethodBody (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, int position, Microsoft.CodeAnalysis.CSharp.Syntax.BaseMethodDeclarationSyntax method, out Microsoft.CodeAnalysis.SemanticModel? speculativeModel);
static member TryGetSpeculativeSemanticModelForMethodBody : Microsoft.CodeAnalysis.SemanticModel * int * Microsoft.CodeAnalysis.CSharp.Syntax.BaseMethodDeclarationSyntax * SemanticModel -> bool
<Extension()>
Public Function TryGetSpeculativeSemanticModelForMethodBody (semanticModel As SemanticModel, position As Integer, method As BaseMethodDeclarationSyntax, ByRef speculativeModel As SemanticModel) As Boolean
參數
- semanticModel
- SemanticModel
- position
- Int32
- method
- BaseMethodDeclarationSyntax
- speculativeModel
- SemanticModel
傳回
適用於
TryGetSpeculativeSemanticModelForMethodBody(SemanticModel, Int32, AccessorDeclarationSyntax, SemanticModel)
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
取得與這個原始程式碼中未出現之方法主體相關聯的 SemanticModel 物件。
假設 position
必須位於這個 SemanticModel 根語法節點的現有方法主體內。
在這個現有方法主體內宣告的區域變數和標籤,不會被視為在已推斷的方法主體範圍內。
public:
[System::Runtime::CompilerServices::Extension]
static bool TryGetSpeculativeSemanticModelForMethodBody(Microsoft::CodeAnalysis::SemanticModel ^ semanticModel, int position, Microsoft::CodeAnalysis::CSharp::Syntax::AccessorDeclarationSyntax ^ accessor, [Runtime::InteropServices::Out] Microsoft::CodeAnalysis::SemanticModel ^ % speculativeModel);
public static bool TryGetSpeculativeSemanticModelForMethodBody (this Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax accessor, out Microsoft.CodeAnalysis.SemanticModel speculativeModel);
public static bool TryGetSpeculativeSemanticModelForMethodBody (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, int position, Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax accessor, out Microsoft.CodeAnalysis.SemanticModel? speculativeModel);
static member TryGetSpeculativeSemanticModelForMethodBody : Microsoft.CodeAnalysis.SemanticModel * int * Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax * SemanticModel -> bool
<Extension()>
Public Function TryGetSpeculativeSemanticModelForMethodBody (semanticModel As SemanticModel, position As Integer, accessor As AccessorDeclarationSyntax, ByRef speculativeModel As SemanticModel) As Boolean
參數
- semanticModel
- SemanticModel
- position
- Int32
- accessor
- AccessorDeclarationSyntax
- speculativeModel
- SemanticModel