50 references to GetAnnotatedNodesAndTokens
Microsoft.CodeAnalysis (2)
Syntax\SyntaxNode.cs (2)
1283return this.GetAnnotatedNodesAndTokens(syntaxAnnotation).Where(n => n.IsNode).Select(n => n.AsNode()!); 1301return this.GetAnnotatedNodesAndTokens(syntaxAnnotation).Where(n => n.IsToken).Select(n => n.AsToken());
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
328=> node.GetAnnotatedNodesAndTokens(syntaxAnnotation).Select(n => n.AsNode()).OfType<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
280foreach (var nodeOrToken in node.GetAnnotatedNodesAndTokens(annotation))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
214_lazyReplacedExpression = (TExpressionSyntax)_lazySemanticRootOfReplacedExpression.GetAnnotatedNodesAndTokens(annotation).Single().AsNode()!;
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
294.GetAnnotatedNodesAndTokens(s_plusEqualsTokenAnnotation).Single().AsToken()
Microsoft.CodeAnalysis.CSharp.Features (5)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
255.GetAnnotatedNodesAndTokens(annotation)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (2)
174newEnclosingStatement = updatedRoot.GetAnnotatedNodesAndTokens(enclosingStatementAnnotation).Single().AsNode(); 178sourceNode = updatedRoot.GetAnnotatedNodesAndTokens(sourceNodeAnnotation).Last().AsNode();
ExtractMethod\CSharpMethodExtractor.TriviaResult.cs (1)
66var token = node.GetAnnotatedNodesAndTokens(annotation).FirstOrDefault().AsToken();
ExtractMethod\Extensions.cs (1)
234=> set.Any(a => node.GetAnnotatedNodesAndTokens(a).Any());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Syntax\SyntaxAnnotationTests.cs (8)
135var matchingNodesOrTokens = tree.GetCompilationUnitRoot().GetAnnotatedNodesAndTokens(annotation); 171var node2 = newRoot.GetAnnotatedNodesAndTokens(annotation1).Single().AsNode(); 203var token2 = newRoot.GetAnnotatedNodesAndTokens(annotation1).Single().AsToken(); 351var annotatedNodesOrTokens = newRoot.GetAnnotatedNodesAndTokens(annotation).OrderBy(t => t.SpanStart).ToList(); 398var sourceNodeOrTokens = sourceTreeRoot.GetAnnotatedNodesAndTokens(annotation); 401var destNodeOrTokens = destTreeRoot.GetAnnotatedNodesAndTokens(annotation); 616var results = root.GetAnnotatedNodesAndTokens(annotation); 630var results = root.GetAnnotatedNodesAndTokens(annotation);
Microsoft.CodeAnalysis.Features (4)
ExtractMethod\AbstractSyntaxTriviaService.Result.cs (1)
264return root.GetAnnotatedNodesAndTokens(annotation).FirstOrDefault().AsToken();
ExtractMethod\InsertionPoint.cs (1)
43return root.GetAnnotatedNodesAndTokens(_annotation).SingleOrDefault().AsNode();
ExtractMethod\MethodExtractor.TriviaResult.cs (2)
38var callsite = root.GetAnnotatedNodesAndTokens(callsiteAnnotation).SingleOrDefault().AsNode(); 39var method = root.GetAnnotatedNodesAndTokens(methodDefinitionAnnotation).SingleOrDefault().AsNode();
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (1)
94originalExpression = DirectCast(semanticRootOfOriginalExpr.GetAnnotatedNodesAndTokens(originalExprAnnotation).Single().AsNode(), ExpressionSyntax)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
Utilities\CommandHandlers\AbstractImplementAbstractClassOrInterfaceCommandHandler.vb (1)
168GetAnnotatedNodesAndTokens(tokenAnnotation).First().AsToken()
Microsoft.CodeAnalysis.VisualBasic.Features (5)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (4)
228.GetAnnotatedNodesAndTokens(s_definitionAnnotation) _ 241Dim annotatedNodesAndTokens = root.GetAnnotatedNodesAndTokens(s_referenceAnnotation) 433Dim inlinedExprNodes = syntaxRootAfterInline.GetAnnotatedNodesAndTokens(s_expressionToInlineAnnotation).ToArray() 445Dim innerInitializerInInlineNode = DirectCast(inlinedNode.GetAnnotatedNodesAndTokens(s_initializerAnnotation).Single().AsNode, ExpressionSyntax)
ExtractMethod\VisualBasicMethodExtractor.TriviaResult.vb (1)
54Dim token = node.GetAnnotatedNodesAndTokens(annotation).FirstOrDefault().AsToken()
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (8)
Syntax\SyntaxAnnotationTests.vb (8)
123Dim matchingNodesOrTokens = tree.GetRoot().GetAnnotatedNodesAndTokens(annotation) 157Dim node2 = newRoot.GetAnnotatedNodesAndTokens(annotation1).Single().AsNode() 188Dim token2 = newRoot.GetAnnotatedNodesAndTokens(annotation1).Single().AsToken() 326Dim annotatedNodesOrTokens = newRoot.GetAnnotatedNodesAndTokens(annotation).OrderBy(Function(x) x.SpanStart) 369Dim sourceNodeOrTokens = sourceTreeRoot.GetAnnotatedNodesAndTokens(annotation) 372Dim destNodeOrTokens = destTreeRoot.GetAnnotatedNodesAndTokens(annotation) 558Dim results = root.GetAnnotatedNodesAndTokens(annotation) 571Dim results = root.GetAnnotatedNodesAndTokens(annotation)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (1)
94originalExpression = DirectCast(semanticRootOfOriginalExpr.GetAnnotatedNodesAndTokens(originalExprAnnotation).Single().AsNode(), ExpressionSyntax)
Microsoft.CodeAnalysis.Workspaces (10)
CaseCorrection\CaseCorrector.cs (1)
49return await CaseCorrectAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(n => n.Span).ToImmutableArray(), cancellationToken).ConfigureAwait(false);
CodeCleanup\AbstractCodeCleanerService.cs (2)
132var previousTokens = node.GetAnnotatedNodesAndTokens(previousMarkerAnnotation).Where(n => n.IsToken).Select(n => n.AsToken()); 133var nextTokens = node.GetAnnotatedNodesAndTokens(nextMarkerAnnotation).Where(n => n.IsToken).Select(n => n.AsToken());
CodeCleanup\CodeCleaner.cs (1)
63return await CleanupAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(n => n.Span).ToImmutableArray(), options, providers, cancellationToken: cancellationToken).ConfigureAwait(false);
Editing\ImportAdder.cs (1)
28return root.GetAnnotatedNodesAndTokens(annotation).Select(t => t.FullSpan);
Simplification\Simplifier.cs (2)
189return await ReduceAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(t => t.FullSpan), optionSet, cancellationToken).ConfigureAwait(false); 196return await ReduceAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(t => t.FullSpan), options, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
328=> node.GetAnnotatedNodesAndTokens(syntaxAnnotation).Select(n => n.AsNode()).OfType<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
280foreach (var nodeOrToken in node.GetAnnotatedNodesAndTokens(annotation))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
214_lazyReplacedExpression = (TExpressionSyntax)_lazySemanticRootOfReplacedExpression.GetAnnotatedNodesAndTokens(annotation).Single().AsNode()!;
Microsoft.VisualStudio.LanguageServices (1)
Venus\ContainedLanguageCodeSupport.cs (1)
237var newMember = newRoot.GetAnnotatedNodesAndTokens(annotation).Single();