260 references to FindToken
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\Infrastructure\SyntaxNodeExtensions.cs (1)
120? root.FindToken(position, includeSkipped || includeDirectives || includeDocumentationComments)
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
101var stringToken = root.FindToken(context.Position);
Microsoft.AspNetCore.App.Analyzers.Test (1)
TestDiagnosticAnalyzer.cs (1)
85var stringToken = root.FindToken(caretPosition);
Microsoft.AspNetCore.App.CodeFixes (1)
Dependencies\ExtensionMethodsCompletionProvider.cs (1)
41var token = root.FindToken(span.Start);
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
38var declaration = root.FindToken(diagnosticSpan.Start).Parent.AncestorsAndSelf().OfType<PropertyDeclarationSyntax>().First();
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
38var declaration = root.FindToken(diagnosticSpan.Start).Parent.AncestorsAndSelf().OfType<PropertyDeclarationSyntax>().First();
Microsoft.CodeAnalysis (2)
Syntax\SyntaxNode.cs (2)
969var node = FindToken(span.Start, findInsideTrivia) 1517var token = this.FindToken(position, findInsideTrivia: false);
Microsoft.CodeAnalysis.CodeStyle (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\LocationExtensions.cs (1)
20=> location.GetSourceTreeOrThrow().GetRoot(cancellationToken).FindToken(location.SourceSpan.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
605? root.FindToken(position, includeSkipped || includeDirectives || includeDocumentationComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
71var token = root.FindToken(position, findInsideTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (2)
77var token = root.FindToken(position, findInsideTrivia); 134var result = root.FindToken(position, findInsideTrivia: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
167baseToken = baseToken.SyntaxTree.GetRoot(cancellationToken).FindToken(textLine.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
152token1 = root.FindToken(span.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
126var token = Root.FindToken(LineToBeIndented.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\HeaderFacts\AbstractHeaderFacts.cs (1)
73var tokenToRightOrIn = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
66? root.FindToken(textSpan.Start) 167var token = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (5)
87var startToken = root.FindToken(textSpan.Start); 105root.GetLastToken(includeZeroWidth: true) : root.FindToken(textSpan.End); 288nextToken = parentNode.FindToken(backwardPosition + 1); 314previousToken = parentNode.FindToken(forwardPosition + 1); 362var startToken = root.FindToken(span.Start).GetPreviousToken();
Microsoft.CodeAnalysis.CodeStyle.Fixes (15)
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (1)
51var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
65var token = root.FindToken(span.Start);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
34var token = root.FindToken(context.Span.Start);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
37var token = root.FindToken(span.Start);
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
47var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (1)
53var token = root.FindToken(diagnostic.AdditionalLocations[0].SourceSpan.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (3)
528var previousToken = root.FindToken(attributeToRemove.FullSpan.Start - 1); 530var nextToken = root.FindToken(attributeToRemove.FullSpan.End + 1); 540var tokenToInsertTrivia = node.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (1)
161var tokenOnLocation = root.FindToken(location);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringHelpers.cs (3)
77var selectionStartToken = node.FindToken(selection.Start); 84var beginningNode = node.FindToken(node.Span.Start).Parent; 85var endNode = node.FindToken(node.Span.End - 1).Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
138var token = root.FindToken(span.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107let token = syntaxRoot.FindToken(r.Location.SourceSpan.Start)
Microsoft.CodeAnalysis.CSharp (8)
Compilation\CSharpCompilation.cs (1)
2658var node = info.Tree.GetRoot(cancellationToken).FindToken(info.Span.Start, findInsideTrivia: false).
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
59var attributedNode = model.SyntaxTree.GetRoot().FindToken(position).Parent;
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
193var token = semanticModel.SyntaxTree.GetRoot().FindToken(position);
Symbols\RangeVariableSymbol.cs (1)
62SyntaxToken token = _location.SourceTree.GetRoot().FindToken(_location.SourceSpan.Start);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
1079var referencedToken = root.FindToken(position); 1292var referencedToken = root.FindToken(referencedPosition);
Symbols\Symbol.cs (1)
513SyntaxToken token = location.SourceTree.GetRoot().FindToken(location.SourceSpan.Start);
Syntax\CSharpSyntaxNode.cs (1)
366return base.FindToken(position, findInsideTrivia);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
391var token = syntaxTree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
626.FindToken(position) 715var node = root.FindToken(position).Parent;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
227var token = root.FindToken(textLine.Start, findInsideTrivia: true);
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
53var token = root.FindToken(span.Start);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
213var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
48var token = root.FindToken(diagnostic.Location.SourceSpan.Start);
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
68var token = root.FindToken(diagnostic.Location.SourceSpan.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
206return contextTree?.GetRoot(cancellationToken).FindToken(contextLocation!.SourceSpan.Start).Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeRefactorings\CSharpRefactoringHelpersService.cs (1)
31var token = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
145var namespaceUsings = root.FindToken(position).Parent!.GetAncestors<BaseNamespaceDeclarationSyntax>().SelectMany(n => n.Usings);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
99var endToken = root.FindToken(position);
StringCopyPaste\StringCopyPasteHelpers.cs (1)
244var node = root.FindToken(position).Parent;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
TypeInferrer\TypeInferrerTests.cs (1)
74var token = root.FindToken(textSpan.Start);
Microsoft.CodeAnalysis.CSharp.Features (18)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
283var closeBraceToken = root.FindToken(closingBraceEndPoint - 1);
Completion\CompletionProviders\Scripting\DirectiveCompletionProviderUtilities.cs (1)
16var token = tree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true);
Debugging\BreakpointResolver.cs (1)
37var token = tree.GetRoot(cancellationToken).FindToken(location.SourceSpan.Start);
Debugging\CSharpProximityExpressionsService.cs (1)
57var token = root.FindToken(position);
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
32_token = _syntaxTree.GetRoot(cancellationToken).FindToken(_position);
Debugging\DataTipInfoGetter.cs (1)
31var token = root.FindToken(position);
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
46return syntaxTree.GetRoot(cancellationToken).FindToken(position).GetAncestor<MemberDeclarationSyntax>();
EditAndContinue\BreakpointSpans.cs (1)
71var node = root.FindToken(position).Parent;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
227node = body.FindToken(position).Parent!;
ExtractMethod\CSharpMethodExtractor.cs (1)
197invocationNameToken = newRoot.FindToken(invocationNameToken.Value.SpanStart);
ExtractMethod\CSharpSelectionValidator.cs (1)
473var lastToken = root.FindToken(textSpan.End);
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
109var nextToken = block.FindToken(openBrace.FullSpan.End);
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
227var token = root.FindToken(textLine.Start, findInsideTrivia: true);
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
53var token = root.FindToken(span.Start);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
213var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
48var token = root.FindToken(diagnostic.Location.SourceSpan.Start);
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
68var token = root.FindToken(diagnostic.Location.SourceSpan.Start);
Wrapping\SeparatedSyntaxList\CSharpArgumentWrapper.cs (1)
97var token = root.FindToken(position);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\BreakpointSpansTests.cs (1)
77var declarationNode = root.FindToken(position).Parent.FirstAncestorOrSelf<TDeclaration>();
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
55var token = tree.GetRoot().FindToken(expected.Start);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\QueryTests.cs (2)
2272var queryContinuation = tree.GetRoot().FindToken(sourceCode.IndexOf("into w", StringComparison.Ordinal)).Parent; 2325var joinInto = tree.GetRoot().FindToken(sourceCode.IndexOf("into x8", StringComparison.Ordinal)).Parent;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\GetSemanticInfoTests.cs (1)
4910var equalsToken = tree.GetRoot().FindToken(position);
Compilation\SemanticModelAPITests.cs (1)
4059var x = tree.GetRoot().FindToken(match.Index + 4).Parent;
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
140var node = tree.GetRoot().FindToken(position).Parent.FirstAncestorOrSelf<TNode>();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxNodeTests.cs (1)
693var token = node.FindToken(i);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CSharpTestBase.cs (1)
1754var node = tree.GetRoot().FindToken(start).Parent;
SemanticModelTestBase.cs (1)
141var nameSyntaxToBind = tree.GetRoot().FindToken(position, findInsideTrivia: true).Parent as IdentifierNameSyntax;
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
391var token = syntaxTree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
626.FindToken(position) 715var node = root.FindToken(position).Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
206return contextTree?.GetRoot(cancellationToken).FindToken(contextLocation!.SourceSpan.Start).Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeRefactorings\CSharpRefactoringHelpersService.cs (1)
31var token = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
145var namespaceUsings = root.FindToken(position).Parent!.GetAncestors<BaseNamespaceDeclarationSyntax>().SelectMany(n => n.Usings);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CSharpSyntaxFactsServiceTests.cs (1)
19var token = tree.GetRoot().FindToken(position);
Microsoft.CodeAnalysis.EditorFeatures (2)
TextStructureNavigation\AbstractTextStructureNavigatorProvider.TextStructureNavigator.cs (2)
101var token = root.FindToken(position, findInsideTrivia: true); 331token = syntaxTree.GetRoot(cancellationToken).FindToken(point, true);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
Completion\AbstractArgumentProviderTests`1.cs (1)
77var token = root.FindToken(position);
Completion\AbstractCompletionProviderTests.cs (1)
97var node = (await document.GetSyntaxRootAsync()).FindToken(position).Parent;
QuickInfo\AbstractSemanticQuickInfoSourceTests.cs (1)
156var node = (await document.GetSyntaxRootAsync()).FindToken(position).Parent;
SignatureHelp\AbstractSignatureHelpProviderTests.cs (1)
121var node = (await document.GetSyntaxRootAsync()).FindToken(position).Parent;
Structure\AbstractSyntaxNodeStructureProviderTests.cs (1)
26var token = root.FindToken(position, findInsideTrivia: true);
TypeInferrer\TypeInferrerTestBase.cs (1)
29var node = (await document.GetSyntaxRootAsync()).FindToken(position).Parent;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeGeneration\CodeGenerationTests.cs (2)
907var token = semanticModel.SyntaxTree.GetRoot().FindToken(selection.Start); 919var token = SemanticModel.SyntaxTree.GetRoot().FindToken(destSpan.Start);
Completion\CompletionServiceTests.cs (1)
134var token = root.FindToken(result.Start);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Peek\PeekHelpers.cs (1)
51var node = root.FindToken(identifierLocation.SourceSpan.Start).Parent;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
238Return doc.GetSyntaxRootAsync().Result.FindToken(position).Parent
Microsoft.CodeAnalysis.Features (31)
BraceMatching\AbstractBraceMatcher.cs (1)
65var token = root.FindToken(position);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (5)
111token = root.FindToken(line.Start); 128token = root.FindToken(line.End); 135token = root.FindToken(lines[indexOfLine].End, findInsideTrivia: true); 278var startToken = root.FindToken(lineAtPos.Start); 285var endToken = root.FindToken(lineAtPos.End);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (2)
268suppressionTargetInfo.StartToken = root.FindToken(startToken.SpanStart); 269suppressionTargetInfo.EndToken = root.FindToken(endToken.SpanStart);
CodeLens\CodeLensReferencesService.cs (1)
119var token = (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)).FindToken(position, true);
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (1)
152var token = root.FindToken(position);
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (1)
57var token = syntaxTree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (2)
98var token = root.FindToken(position); 315var token = root.FindToken(location.SourceSpan.Start, findInsideTrivia: true);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
1371newStatementSyntax = newEncompassingAncestor.FindToken(newStatementSyntaxSpan.Start).Parent; 1577var node = root.FindToken(unmappedActiveStatementSpan.Start).Parent;
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeEmbeddedLanguage.cs (1)
42var token = root.FindToken(position);
ExtractMethod\MethodExtractor.VariableSymbol.cs (1)
250var token = tree.GetRoot(cancellationToken).FindToken(span.Start);
ExtractMethod\SelectionValidator.cs (2)
89var token1 = root.FindToken(textSpan.Start); 149var token1 = root.FindToken(textSpan.Start);
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
77var token = root.FindToken(position);
QuickInfo\CommonSemanticQuickInfoProvider.cs (1)
147var linkedToken = root.FindToken(token.SpanStart);
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
129var token = root.FindToken(position);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (2)
250var nameToken = root.FindToken(location.SourceSpan.Start); 290var nameToken = root.FindToken(location.SourceSpan.Start);
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
262var nameToken = root.FindToken(location.SourceSpan.Start, findInsideTrivia: true);
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (1)
48var token = root.FindToken(span.Start, findInsideTrivia: true);
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
55var token = syntaxRoot.FindToken(span.Start);
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (1)
67var token = root.FindToken(tokenSpan.Start);
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (1)
51var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
65var token = root.FindToken(span.Start);
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
47var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueTestVerifier.cs (1)
386var result = root.FindToken(span.Start).Parent!;
Microsoft.CodeAnalysis.Test.Utilities (2)
Diagnostics\DiagnosticDescription.cs (2)
285if (!_syntaxPredicate(d._location.SourceTree.GetRoot().FindToken(_location.SourceSpan.Start, true).Parent)) 298if (!d._syntaxPredicate(_location.SourceTree.GetRoot().FindToken(_location.SourceSpan.Start, true).Parent))
Microsoft.CodeAnalysis.UnitTests (2)
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (1)
1397var token = model.SyntaxTree.GetRoot().FindToken(pos);
Symbols\DocumentationCommentIdTests.cs (1)
178var token = root.FindToken(text.IndexOf('+'));
Microsoft.CodeAnalysis.VisualBasic (6)
Compilation\SemanticModel.vb (4)
620token = SyntaxTree.GetRoot().FindToken(position, True) 622token = Root.FindToken(position, True) 628token = SyntaxTree.GetRoot().FindToken(position) 630token = Root.FindToken(position)
Symbols\Symbol.vb (1)
373Dim token = CType(location.SourceTree.GetRoot().FindToken(location.SourceSpan.Start), SyntaxToken)
Syntax\VisualBasicSyntaxNode_TreeTraversalHelpers.vb (1)
20Return MyBase.FindToken(position, findInsideTrivia)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (1)
359Dim token = syntaxTree.GetRoot(cancellationToken).FindToken(line.Start)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (2)
639FindToken(position). 766Dim node = root.FindToken(position).Parent
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeRefactorings\VisualBasicRefactoringHelpersService.vb (1)
26Dim token = root.FindToken(position)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
107Dim token = syntaxTree.GetRoot(cancellationToken).FindToken(position)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
AutomaticEndConstructCorrection\AutomaticEndConstructCorrector.vb (1)
148token = root.FindToken(textChange.OldPosition)
LineCommit\ContainingStatementInfo.vb (1)
98Dim token = syntaxTree.GetRoot(cancellationToken).FindToken(point, findInsideTrivia:=True)
Microsoft.CodeAnalysis.VisualBasic.Features (15)
BraceMatching\InterpolatedStringBraceMatcher.vb (1)
30Dim token = root.FindToken(position)
BraceMatching\StringLiteralBraceMatcher.vb (1)
26Dim token = root.FindToken(position)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (1)
67Dim token = root.FindToken(context.Span.Start)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
47Dim token = root.FindToken(context.Span.Start)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
64Dim token = root.FindToken(span.Start)
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
47Dim token = root.FindToken(span.Start)
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (1)
49Dim token = root.FindToken(span.Start)
Debugging\DataTipInfoGetter.vb (1)
17Dim token = root.FindToken(position)
Debugging\ProximityExpressionsGetter.vb (1)
63Dim token = root.FindToken(position)
Debugging\ProximityExpressionsGetter.Worker.vb (1)
27Dim token = _syntaxTree.GetRoot(cancellationToken).FindToken(_position)
DocumentationComments\VisualBasicDocumentationCommentSnippetService.vb (1)
27Return syntaxTree.GetRoot(cancellationToken).FindToken(position).GetContainingMember()
EditAndContinue\BreakpointSpans.vb (1)
59Dim node = root.FindToken(position).Parent
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
147node = body.FindToken(position).Parent
ExtractMethod\VisualBasicSelectionValidator.vb (1)
606Dim lastToken = root.FindToken(textSpan.End)
Wrapping\SeparatedSyntaxList\VisualBasicArgumentWrapper.vb (1)
75Dim token = root.FindToken(position)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
39Dim node = tree.GetRoot().FindToken(expected.Key).Parent
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (31)
DocumentationComments\DocCommentTests.vb (1)
12089Dim token As SyntaxToken = tree.GetRoot().FindToken(position, True)
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (30)
109Dim declaratorQ = tree.GetRoot().FindToken(posQ).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 116Dim declaratorX = tree.GetRoot().FindToken(posX).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 123Dim declaratorZ = tree.GetRoot().FindToken(posZ).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 245Dim declaratorW = tree.GetRoot().FindToken(posW).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 250Dim declaratorZF = tree.GetRoot().FindToken(posZF).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 252tree.GetRoot().FindToken(select1).GetLocation, 255tree.GetRoot().FindToken(x2 - 2).GetLocation(), 256tree.GetRoot().FindToken(y4 - 2).GetLocation()) 260Dim declaratorZL = tree.GetRoot().FindToken(posZL).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 262tree.GetRoot().FindToken(select2).GetLocation, 265tree.GetRoot().FindToken(x5 - 2).GetLocation(), 266tree.GetRoot().FindToken(y5 - 2).GetLocation()) 316Dim declaratorT = tree.GetRoot().FindToken(posT).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 321Dim declaratorA = tree.GetRoot().FindToken(posA).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 323tree.GetRoot().FindToken(sub2).Parent.Parent.GetLocation, 326tree.GetRoot().FindToken(x1 - 2).GetLocation(), 327tree.GetRoot().FindToken(y1 - 2).GetLocation()) 331Dim declaratorB = tree.GetRoot().FindToken(posB).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 333tree.GetRoot().FindToken(sub4).Parent.Parent.GetLocation, 336tree.GetRoot().FindToken(x2 - 2).GetLocation(), 337tree.GetRoot().FindToken(y2 - 2).GetLocation()) 383Dim declaratorT = tree.GetRoot().FindToken(posT).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 388Dim declaratorA = tree.GetRoot().FindToken(posA).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 390tree.GetRoot().FindToken(sub1).Parent.Parent.GetLocation, 393tree.GetRoot().FindToken(x1 - 2).GetLocation(), 394tree.GetRoot().FindToken(y1 - 2).GetLocation()) 398Dim declaratorB = tree.GetRoot().FindToken(posB).Parent.FirstAncestorOrSelf(Of VariableDeclaratorSyntax)() 401tree.GetRoot().FindToken(sub2).Parent.Parent.GetLocation, 404tree.GetRoot().FindToken(x2 - 2).GetLocation(), 405tree.GetRoot().FindToken(y2 - 2).GetLocation())
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (4)
Syntax\ManualTests.vb (1)
227Dim token = tree.GetRoot().FindToken(text.Lines.Item(3).Start)
TestSyntaxNodes.vb (3)
1736Assert.Equal(0, tree.GetRoot().FindToken(node.FullSpan.Length - 1).TrailingTrivia.Count) 1737Assert.Equal(1, tree.GetRoot().FindToken(0).LeadingTrivia.Count) 2336Dim token = node.FindToken(i)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
CompilationTestUtils.vb (2)
661Dim node = tree.GetRoot().FindToken(position) 1139node = tree.GetRoot().FindToken(pos).Parent
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (1)
359Dim token = syntaxTree.GetRoot(cancellationToken).FindToken(line.Start)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (2)
639FindToken(position). 766Dim node = root.FindToken(position).Parent
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeRefactorings\VisualBasicRefactoringHelpersService.vb (1)
26Dim token = root.FindToken(position)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
107Dim token = syntaxTree.GetRoot(cancellationToken).FindToken(position)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (2)
VisualBasicSyntaxFactsServiceTests.vb (2)
528Dim token = tree.GetRoot().FindToken(position) 544Dim node = tree.GetRoot().FindToken(position).Parent
Microsoft.CodeAnalysis.Workspaces (28)
CodeCleanup\AbstractCodeCleanerService.cs (1)
366startToken = root.FindToken(span.Start, findInsideTrivia: true);
FindSymbols\FindReferences\FindReferenceCache.cs (1)
200var token = this.Root.FindToken(index, findInsideTrivia: true);
Rename\RenameUtilities.cs (1)
47var bindableToken = semanticModel.SyntaxTree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\LocationExtensions.cs (1)
20=> location.GetSourceTreeOrThrow().GetRoot(cancellationToken).FindToken(location.SourceSpan.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
605? root.FindToken(position, includeSkipped || includeDirectives || includeDocumentationComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
71var token = root.FindToken(position, findInsideTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (2)
77var token = root.FindToken(position, findInsideTrivia); 134var result = root.FindToken(position, findInsideTrivia: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
167baseToken = baseToken.SyntaxTree.GetRoot(cancellationToken).FindToken(textLine.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
152token1 = root.FindToken(span.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
126var token = Root.FindToken(LineToBeIndented.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\HeaderFacts\AbstractHeaderFacts.cs (1)
73var tokenToRightOrIn = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
66? root.FindToken(textSpan.Start) 167var token = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (5)
87var startToken = root.FindToken(textSpan.Start); 105root.GetLastToken(includeZeroWidth: true) : root.FindToken(textSpan.End); 288nextToken = parentNode.FindToken(backwardPosition + 1); 314previousToken = parentNode.FindToken(forwardPosition + 1); 362var startToken = root.FindToken(span.Start).GetPreviousToken();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (3)
528var previousToken = root.FindToken(attributeToRemove.FullSpan.Start - 1); 530var nextToken = root.FindToken(attributeToRemove.FullSpan.End + 1); 540var tokenToInsertTrivia = node.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (1)
161var tokenOnLocation = root.FindToken(location);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringHelpers.cs (3)
77var selectionStartToken = node.FindToken(selection.Start); 84var beginningNode = node.FindToken(node.Span.Start).Parent; 85var endNode = node.FindToken(node.Span.End - 1).Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
138var token = root.FindToken(span.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107let token = syntaxRoot.FindToken(r.Location.SourceSpan.Start)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
BatchFixAllProviderTests.cs (1)
126var token = root.FindToken(sourceSpan.Start);
Microsoft.ML.InternalCodeAnalyzer (2)
ContractsCheckNameofFixProvider.cs (1)
44var nameArg = root.FindToken(diagnosticSpan.Start).Parent.FirstAncestorOrSelf<ArgumentSyntax>();
NameFixProvider.cs (1)
60var token = root.FindToken(diagnostic.Location.SourceSpan.Start);
Microsoft.VisualStudio.LanguageServices (4)
LanguageService\AbstractLanguageService`2.IVsLanguageTextOps.cs (1)
94var prevToken = root.FindToken(start).GetPreviousToken();
Venus\ContainedDocument.cs (3)
832var current = root.FindToken(visibleTextSpan.Start).Parent; 973var token = root.FindToken(end); 997var token = root.FindToken(end, findInsideTrivia: true);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (2)
3198var startToken = root.FindToken(span.Start).GetPreviousToken(); 3204var endToken = root.FindToken(span.End).GetNextToken();
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
CodeModel\VisualBasicCodeModelService.vb (2)
3732Dim startToken = GetTokenWithoutAnnotation(root.FindToken(span.Start).GetPreviousToken(), Function(t) t.GetPreviousToken()) 3733Dim endToken = GetTokenWithoutAnnotation(root.FindToken(span.End), Function(t) t.GetNextToken())
Help\VisualBasicHelpContextService.vb (1)
41Dim token = tree.GetRoot(cancellationToken).FindToken(span.Start, findInsideTrivia:=True)
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
42PropertyDeclarationSyntax? propertyDeclaration = root.FindToken(diagnosticSpan.Start)
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (1)
AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.vb (1)
49FindToken(diagnosticSpan.Start).