SemanticModelExtensions.GetEnclosingSymbol<TSymbol>(SemanticModel, Int32, CancellationToken) Method
Containing Type: SemanticModelExtensions
Assembly: Roslynator.Core.dll
Returns the innermost symbol of type TSymbol that the specified position is considered inside of.
public static TSymbol? GetEnclosingSymbol<TSymbol>(this Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, System.Threading.CancellationToken cancellationToken = default) where TSymbol : Microsoft.CodeAnalysis.ISymbol
Type Parameters
TSymbol
Parameters
semanticModel SemanticModel
position Int32
cancellationToken CancellationToken
Returns
TSymbol