2 implementations of GetContainingTypeDeclaration
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CSharpSyntaxFacts.cs (1)
621public SyntaxNode? GetContainingTypeDeclaration(SyntaxNode root, int position)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
VisualBasicSyntaxFacts.vb (1)
638Public Function GetContainingTypeDeclaration(root As SyntaxNode, position As Integer) As SyntaxNode Implements ISyntaxFacts.GetContainingTypeDeclaration
11 references to GetContainingTypeDeclaration
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
284var typeDeclaration = syntaxFactsService.GetContainingTypeDeclaration(
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
98syntaxFacts.GetContainingTypeDeclaration(root, position) is EnumDeclarationSyntax ||
Microsoft.CodeAnalysis.EditorFeatures (1)
GoToDefinition\AbstractGoToDefinitionService.cs (1)
143var containingTypeDeclaration = syntaxFactsService.GetContainingTypeDeclaration(syntaxRoot, caretPosition);
Microsoft.CodeAnalysis.Features (2)
AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
68_syntaxFacts.GetContainingTypeDeclaration(root, node.SpanStart);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
188var typeDeclaration = syntaxFacts.GetContainingTypeDeclaration(root, textSpan.Start);
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
VisualBasicSyntaxFacts.vb (1)
638Public Function GetContainingTypeDeclaration(root As SyntaxNode, position As Integer) As SyntaxNode Implements ISyntaxFacts.GetContainingTypeDeclaration
Microsoft.CodeAnalysis.Workspaces (4)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (1)
755syntaxFacts.GetContainingTypeDeclaration(node, node.SpanStart),
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (3)
56var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)!.FullSpan; 81: syntaxFacts.GetContainingTypeDeclaration(root, span.Start); 94: syntaxFacts.GetContainingTypeDeclaration(root, span.End);
Microsoft.VisualStudio.LanguageServices (1)
Venus\ContainedLanguageCodeSupport.cs (1)
212var destinationType = syntaxFacts.GetContainingTypeDeclaration(targetSyntaxTree.GetRoot(cancellationToken), position);