共用方式為


SemanticModel.GetEnclosingSymbolCore(Int32, CancellationToken) 方法

定義

指定這個 SemanticModel 的 SyntaxTree 中的位置會傳回最內層的符號,該位置會視為在 內。

protected abstract Microsoft.CodeAnalysis.ISymbol GetEnclosingSymbolCore (int position, System.Threading.CancellationToken cancellationToken = default);
protected abstract Microsoft.CodeAnalysis.ISymbol? GetEnclosingSymbolCore (int position, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEnclosingSymbolCore : int * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.ISymbol
Protected MustOverride Function GetEnclosingSymbolCore (position As Integer, Optional cancellationToken As CancellationToken = Nothing) As ISymbol

參數

position
Int32
cancellationToken
CancellationToken

傳回

適用於