7 references to GetAncestorsOrThis
Microsoft.CodeAnalysis.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
79return node?.GetAncestorsOrThis<TNode>().FirstOrDefault(); 174return node.GetAncestorsOrThis<SyntaxNode>().Contains(child); 184set.AddRange(node2.GetAncestorsOrThis<SyntaxNode>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (2)
71return applicableContainer.GetAncestorsOrThis<SyntaxNode>().ToImmutableArray(); 169var contextSpine = applicableContainer.GetAncestorsOrThis<SyntaxNode>().ToImmutableArray();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
186var blocks = state.InnermostBlock.GetAncestorsOrThis<SyntaxNode>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
127expr => expr.GetAncestorsOrThis<TStatementSyntax>()));