2 implementations of GetContainingMemberDeclaration
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CSharpSyntaxFacts.cs (1)
694public SyntaxNode? GetContainingMemberDeclaration(SyntaxNode root, int position, bool useFullSpan = true)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
VisualBasicSyntaxFacts.vb (1)
708Public Function GetContainingMemberDeclaration(root As SyntaxNode, position As Integer, Optional useFullSpan As Boolean = True) As SyntaxNode Implements ISyntaxFacts.GetContainingMemberDeclaration
20 references to GetContainingMemberDeclaration
Microsoft.CodeAnalysis.CSharp.Features (1)
Debugging\LocationInfoGetter.cs (1)
27var memberDeclaration = syntaxFactsService.GetContainingMemberDeclaration(root, position, useFullSpan: true);
Microsoft.CodeAnalysis.EditorFeatures (1)
Classification\Semantic\ClassificationUtilities.cs (1)
127var member = service.GetContainingMemberDeclaration(root, changedSpan.Start);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
191Dim start = syntaxFacts.GetContainingMemberDeclaration(root, invocationPoint)
Microsoft.CodeAnalysis.Features (8)
AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
67return _syntaxFacts.GetContainingMemberDeclaration(root, node.SpanStart) ??
AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
257return diagnostics.GroupBy(d => syntaxFacts.GetContainingMemberDeclaration(root, d.Location.SourceSpan.Start) ?? root); 877memberDeclaration = syntaxFacts.GetContainingMemberDeclaration(root, memberDeclaration.SpanStart) ?? root;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
295var targetMemberNode = syntaxFacts.GetContainingMemberDeclaration(root, nodeWithTokens.SpanStart);
SolutionCrawler\AbstractDocumentDifferenceService.cs (4)
112var oldMember = syntaxFactsService.GetContainingMemberDeclaration(oldRoot, range.Span.Start); 113var newMember = syntaxFactsService.GetContainingMemberDeclaration(newRoot, range.Span.Start); 153var oldMember = syntaxFactsService.GetContainingMemberDeclaration(oldRoot, range.Span.Start); 154var newMember = syntaxFactsService.GetContainingMemberDeclaration(newRoot, range.Span.Start);
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Diagnostics\DocumentAnalysisExecutor.cs (2)
292var startNode = service.GetContainingMemberDeclaration(root, span.Value.Start); 293var endNode = service.GetContainingMemberDeclaration(root, span.Value.End);
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Debugging\LocationInfoGetter.vb (1)
22Dim memberDeclaration = TryCast(syntaxFactsService.GetContainingMemberDeclaration(root, position, useFullSpan:=True), DeclarationStatementSyntax)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
VisualBasicSyntaxFacts.vb (1)
708Public Function GetContainingMemberDeclaration(root As SyntaxNode, position As Integer, Optional useFullSpan As Boolean = True) As SyntaxNode Implements ISyntaxFacts.GetContainingMemberDeclaration
Microsoft.CodeAnalysis.Workspaces (3)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (1)
764syntaxFacts.GetContainingMemberDeclaration(node, node.SpanStart),
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (2)
80? syntaxFacts.GetContainingMemberDeclaration(root, span.Start) 93? syntaxFacts.GetContainingMemberDeclaration(root, span.End)
Microsoft.VisualStudio.LanguageServices (2)
LanguageService\AbstractLanguageService`2.IVsLanguageBlock.cs (1)
81var node = syntaxFactsService.GetContainingMemberDeclaration(syntaxRoot, position, useFullSpan: false);
Library\ClassView\AbstractSyncClassViewCommandHandler.cs (1)
82var memberDeclaration = syntaxFactsService.GetContainingMemberDeclaration(root, caretPosition);