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