共用方式為


CSharpExtensions.TryGetSpeculativeSemanticModelForMethodBody 方法

定義

多載

TryGetSpeculativeSemanticModelForMethodBody(SemanticModel, Int32, BaseMethodDeclarationSyntax, SemanticModel)

取得與這個原始程式碼中未出現之方法主體相關聯的 SemanticModel 物件。 假設 position 必須位於這個 SemanticModel 根語法節點的現有方法主體內。 在這個現有方法主體內宣告的區域變數和標籤,不會被視為在已推斷的方法主體範圍內。

TryGetSpeculativeSemanticModelForMethodBody(SemanticModel, Int32, AccessorDeclarationSyntax, SemanticModel)

取得與這個原始程式碼中未出現之方法主體相關聯的 SemanticModel 物件。 假設 position 必須位於這個 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
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
speculativeModel
SemanticModel

傳回

適用於