253 references to GetSyntaxRootAsync
AnalyzerRunner (2)
CodeRefactoringRunner.cs (2)
65updatedSolution = updatedSolution.WithDocumentSyntaxRoot(document.Id, await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)); 78var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
IdeCoreBenchmarks (4)
FormatterBenchmarks.cs (2)
54var root = document.GetSyntaxRootAsync(CancellationToken.None).Result.WithAdditionalAnnotations(Formatter.Annotation); 70var formattedRoot = formattedDoc.GetSyntaxRootAsync(CancellationToken.None).Result;
NavigateToBenchmarks.cs (2)
116roots.Add(await document.GetSyntaxRootAsync()); 194var tree = await d.GetSyntaxRootAsync();
ILLink.CodeFixProvider (2)
BaseAttributeCodeFixProvider.cs (1)
39 if (await document.GetSyntaxRootAsync (context.CancellationToken).ConfigureAwait (false) is not { } root)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
99 if (await document.GetSyntaxRootAsync (context.CancellationToken).ConfigureAwait (false) is not { } root)
Microsoft.Analyzers.Extra (3)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (2)
39internal Func<Document, CancellationToken, Task<SyntaxNode?>> GetSyntaxRootAsync = (d, t) => d.GetSyntaxRootAsync(t); 324var root = await doc.GetSyntaxRootAsync().ConfigureAwait(false);
MakeExeTypesInternalFixer.cs (1)
28var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.Analyzers.Extra.Tests (1)
CallAnalysis\LegacyLoggingTests.cs (1)
822var targetRoot = await targetDoc.GetSyntaxRootAsync(CancellationToken.None);
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
96var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
95var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.App.Analyzers.Test (1)
TestDiagnosticAnalyzer.cs (1)
79var root = await document.GetSyntaxRootAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.AspNetCore.App.CodeFixes (10)
Authorization\AddAuthorizationBuilderFixer.cs (1)
29var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Dependencies\AddPackageFixer.cs (1)
31var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Dependencies\ExtensionMethodsCompletionProvider.cs (1)
34var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
DetectMismatchedParameterOptionalityFixer.cs (1)
39var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Http\HeaderDictionaryAddFixer.cs (1)
30var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Http\HeaderDictionaryIndexerFixer.cs (1)
44var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Kestrel\ListenOnIPv6AnyFixer.cs (1)
34var root = await context.Document.GetSyntaxRootAsync(cancellationToken);
PublicPartialProgramClassFixer.cs (1)
32var root = await context.Document.GetSyntaxRootAsync(cancellationToken);
RouteParameterUnusedParameterFixer.cs (1)
31var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
WebApplicationBuilderFixer.cs (1)
31var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
33var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Components.Analyzers.Tests (3)
Helpers\CodeFixVerifier.Helper.cs (1)
81var root = simplifiedDoc.GetSyntaxRootAsync().Result;
Verifiers\CodeFixVerifier.cs (2)
109document = document.WithSyntaxRoot(Formatter.Format(document.GetSyntaxRootAsync().Result, Formatter.Annotation, document.Project.Solution.Workspace)); 117document.GetSyntaxRootAsync().Result.ToFullString()));
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
33var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (3)
Helpers\CodeFixVerifier.Helper.cs (1)
81var root = simplifiedDoc.GetSyntaxRootAsync().Result;
Verifiers\CodeFixVerifier.cs (2)
109document = document.WithSyntaxRoot(Formatter.Format(document.GetSyntaxRootAsync().Result, Formatter.Annotation, document.Project.Solution.Workspace)); 117document.GetSyntaxRootAsync().Result.ToFullString()));
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
AddResponseTypeAttributeCodeFixAction.cs (2)
110var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 129var root = await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ApiActionsDoNotRequireExplicitModelValidationCodeFixProvider.cs (1)
54var rootNode = await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CodeStyle.Fixes (8)
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (1)
32var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
28var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
85var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
84root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (2)
173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
83var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
51var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (12)
CodeActions\PreviewExceptionTests.cs (1)
110var span = document.GetSyntaxRootAsync().Result.Span;
CodeActions\PreviewTests.cs (1)
95var span = document.GetSyntaxRootAsync().Result.Span;
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (1)
170var modifiedOringinalRoot = await modifiedOriginalDocument.GetSyntaxRootAsync();
CodeGeneration\SyntaxGeneratorTests.cs (2)
37var root = await document.GetSyntaxRootAsync(); 71var root = await document.GetSyntaxRootAsync();
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
73var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
ExtractMethod\ExtractMethodBase.cs (1)
201var root = await document.GetSyntaxRootAsync();
Formatting\CodeCleanupTests.TestFixers.cs (1)
32var root = await context.Document.GetSyntaxRootAsync(cancellationToken);
Formatting\Indentation\SmartIndenterEnterOnTokenTests.cs (2)
1407var root = (await document.GetSyntaxRootAsync()) as CompilationUnitSyntax; 1448var root = (await document.GetSyntaxRootAsync()) as CompilationUnitSyntax;
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (1)
3422var root = (CompilationUnitSyntax)await document.GetSyntaxRootAsync();
TypeInferrer\TypeInferrerTests.cs (1)
27var root = await document.GetSyntaxRootAsync();
Microsoft.CodeAnalysis.CSharp.Features (19)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (3)
182var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 253var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 262var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (1)
340var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\CSharpSyncNamespaceCodeRefactoringProvider.cs (1)
34if (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false) is not CompilationUnitSyntax compilationUnit)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
120var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Debugging\CSharpProximityExpressionsService.cs (1)
56var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
DecompiledSource\CSharpDecompiledSourceService.cs (1)
100var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
EncapsulateField\CSharpEncapsulateFieldService.cs (3)
38var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 88root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 126var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpMethodExtractor.cs (2)
194var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 197var newRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
173var updatedRoot = await updatedDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
GenerateType\CSharpGenerateTypeService.cs (1)
726root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
MetadataAsSource\CSharpMetadataAsSourceService.cs (2)
45var oldRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 63var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Organizing\CSharpOrganizingService.cs (1)
27var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
51var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
305var oldSyntaxRoot = await oldDocument.GetSyntaxRootAsync(); 310var newSyntaxRoot = await newDocument.GetSyntaxRootAsync();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
OrganizeImports\CSharpOrganizeImportsService.cs (1)
22var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\AddAttributesTests.cs (1)
51var syntaxRoot = await doc.GetSyntaxRootAsync();
CodeGeneration\AddImportsTests.cs (1)
44var root = await doc.GetSyntaxRootAsync();
CodeGeneration\SymbolEditorTests.cs (1)
59return (await document.GetSyntaxRootAsync()).ToFullString();
Formatting\FormattingTreeEditTests.cs (1)
39var root = await document.GetSyntaxRootAsync();
Microsoft.CodeAnalysis.EditorFeatures (2)
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
333var currentRoot = await currentDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
InlineRename\AbstractEditorInlineRenameService.cs (1)
51var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (11)
CodeLens\AbstractCodeLensTest.cs (4)
26var syntaxNode = await document.GetSyntaxRootAsync(); 54var syntaxNode = await document.GetSyntaxRootAsync(); 80var syntaxNode = await document.GetSyntaxRootAsync(); 106var syntaxNode = await document.GetSyntaxRootAsync();
Completion\AbstractCompletionProviderTests.cs (1)
97var node = (await document.GetSyntaxRootAsync()).FindToken(position).Parent;
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
54var root = await document.GetSyntaxRootAsync();
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)
25var root = await document.GetSyntaxRootAsync(CancellationToken.None);
Structure\AbstractSyntaxTriviaStructureProviderTests.cs (1)
22var root = await document.GetSyntaxRootAsync();
TypeInferrer\TypeInferrerTestBase.cs (1)
29var node = (await document.GetSyntaxRootAsync()).FindToken(position).Parent;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (10)
CodeFixes\ErrorCases\CodeFixExceptionInRegisterMethodAsync.cs (1)
23var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
CodeGeneration\CodeGenerationTests.cs (4)
91var root = await testContext.Document.GetSyntaxRootAsync(); 316testContext.Result = testContext.Document.WithSyntaxRoot((await testContext.Document.GetSyntaxRootAsync()).ReplaceNode(oldSyntax, newSyntax)); 332testContext.Result = testContext.Document.WithSyntaxRoot((await testContext.Document.GetSyntaxRootAsync()).ReplaceNode(oldMemberSyntax, newMemberSyntax)); 960var actual = Formatter.FormatAsync(simplified, Formatter.Annotation, formattingOptions, CancellationToken.None).Result.GetSyntaxRootAsync().Result.ToFullString();
Completion\CompletionServiceTests.cs (1)
133var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
670var root = await document.GetSyntaxRootAsync(); 1015var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
67var span = (await document.GetSyntaxRootAsync()).FullSpan;
SymbolFinder\DependentTypeFinderTests.cs (1)
645var csRoot = await csDoc.GetSyntaxRootAsync();
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (6)
CodeFixes\CodeFixServiceTests.vb (2)
227Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 252Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
238Return doc.GetSyntaxRootAsync().Result.FindToken(position).Parent
Diagnostics\DiagnosticServiceTests.vb (1)
60Return Await GetDiagnosticsForSpanAsync(diagnosticService, document, range:=(Await document.GetSyntaxRootAsync()).FullSpan)
NavigationBar\TestHelpers.vb (1)
103Dim actual = (Await newDocument.GetSyntaxRootAsync()).ToFullString().TrimEnd()
Simplification\ParameterSimplificationTests.vb (1)
27(Await document.GetSyntaxRootAsync()).WithAdditionalAnnotations(Simplifier.Annotation))
Microsoft.CodeAnalysis.Features (24)
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (1)
67var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
AddImport\References\Reference.cs (1)
94var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
BraceMatching\AbstractBraceMatcher.cs (1)
64var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
BracePairs\IBracePairsService.cs (1)
49var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.LocalSuppressMessageCodeAction.cs (1)
32var root = await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeLens\CodeLensReferencesService.cs (1)
119var token = (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)).FindToken(position, true);
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (1)
130var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
50var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs (1)
185var root = await GetOrDefaultAsync(document, (d, c) => d.GetSyntaxRootAsync(c), cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
409var root = await generateTypeOptionsResult.ExistingDocument.GetSyntaxRootAsync(_cancellationToken).ConfigureAwait(false);
MoveToNamespace\AbstractMoveToNamespaceService.cs (2)
69var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 127container = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (2)
44var root = await document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 67var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (2)
81var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 105var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
SolutionCrawler\AbstractDocumentDifferenceService.cs (2)
65oldRoot = await oldDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 66newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (2)
46var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 222var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\AbstractMergeIfStatementsCodeRefactoringProvider.cs (1)
69var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (1)
65var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (1)
32var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
28var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Diagnostics\TestDiagnosticAnalyzerDriver.cs (1)
88var span = (await document.GetSyntaxRootAsync()).FullSpan;
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (5)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryByVal\VisualBasicRemoveUnnecessaryByValCodeFixProvider.vb (1)
38Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (2)
97Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 119Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\SimplifyObjectCreation\VisualBasicSimplifyObjectCreationCodeFixProvider.vb (1)
36Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
40Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService.vb (1)
50Dim root = Await destinationDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.VisualBasic.Features (42)
AddImport\VisualBasicAddImportFeatureService.vb (1)
301Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
BraceMatching\InterpolatedStringBraceMatcher.vb (1)
29Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
BraceMatching\StringLiteralBraceMatcher.vb (1)
25Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
689Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.CodeAction.vb (1)
30Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (1)
37Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (2)
65Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 255Dim tree = Await updatedDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
45Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.AddKeywordCodeAction.vb (1)
41Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceKeywordCodeAction.vb (1)
40Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceTokenKeywordCodeAction.vb (1)
33Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
62Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (2)
45Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 80Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (1)
47Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.AddKeywordAction.vb (1)
44Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.vb (1)
37Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (3)
226Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 236Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 432Dim syntaxRootAfterInline = Await inlinedDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeRefactorings\RemoveStatementCodeAction.vb (1)
30Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Debugging\DataTipInfoGetter.vb (1)
24Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Debugging\ProximityExpressionsGetter.vb (1)
62Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
EncapsulateField\VisualBasicEncapsulateFieldService.vb (2)
31Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 71Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
GenerateType\VisualBasicGenerateTypeService.vb (1)
627root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (2)
41Dim oldRoot = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 60Dim syntaxRoot = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Organizing\VisualBasicOrganizerService.vb (1)
23Dim root = DirectCast(Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False), SyntaxNode)
SignatureHelp\AbstractIntrinsicOperatorSignatureHelpProvider.vb (1)
32Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\AttributeSignatureHelpProvider.vb (1)
55Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\CollectionInitializerSignatureHelpProvider.vb (1)
49Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (1)
57Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\GenericNameSignatureHelpProvider.vb (1)
64Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\InvocationExpressionSignatureHelpProvider.vb (1)
66Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.vb (1)
65Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (1)
71Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryByVal\VisualBasicRemoveUnnecessaryByValCodeFixProvider.vb (1)
38Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (2)
97Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 119Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\SimplifyObjectCreation\VisualBasicSimplifyObjectCreationCodeFixProvider.vb (1)
36Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
475Dim newSyntaxRoot = Await newDocument.GetSyntaxRootAsync()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
CodeCleanup\Providers\AbstractTokensCodeCleanupProvider.vb (1)
23Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (1)
36Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeCleanup\Providers\RemoveUnnecessaryLineContinuationCodeCleanupProvider.vb (1)
39Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
OrganizeImports\VisualBasicOrganizeImportsService.vb (1)
21Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
40Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (6)
CodeGeneration\AddImportsTests.vb (1)
50Dim root = Await doc.GetSyntaxRootAsync()
Formatting\FormattingTests.vb (4)
3017Dim root = Await document.GetSyntaxRootAsync() 3025Dim root2 = Await document2.GetSyntaxRootAsync() 4204Dim propertyBlock = (Await document.GetSyntaxRootAsync()).DescendantNodes().OfType(Of PropertyBlockSyntax).Single() 4207(Await document.GetSyntaxRootAsync()).ReplaceNode(propertyBlock, propertyBlock.WithAccessors(SyntaxFactory.SingletonList(setter))))
OrganizeImports\OrganizeImportsTests.vb (1)
66Dim newRoot = Await formattedDocument.GetSyntaxRootAsync()
Microsoft.CodeAnalysis.Workspaces (11)
CaseCorrection\AbstractCaseCorrectionService.cs (1)
29var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CaseCorrection\CaseCorrector.cs (2)
28var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 43var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Classification\AbstractClassificationService.cs (1)
204var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
84root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (2)
173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
83var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Document.cs (2)
139/// <see cref="GetSyntaxTreeAsync"/> and <see cref="GetSyntaxRootAsync"/> methods. 210/// In almost all cases, you should call <see cref="GetSyntaxRootAsync"/> to fetch the root node, which will parse
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
339var root = await d1.GetSyntaxRootAsync(); 2905var root = await document.GetSyntaxRootAsync();
Microsoft.CodeAnalysis.Workspaces.UnitTests (28)
CodeCleanup\CodeCleanupTests.cs (13)
59var root = await document.GetSyntaxRootAsync(); 69var root = await document.GetSyntaxRootAsync(); 113var root = await document.GetSyntaxRootAsync(); 124var root = await document.GetSyntaxRootAsync(); 135document = document.WithSyntaxRoot((await document.GetSyntaxRootAsync()).WithAdditionalAnnotations(annotation)); 148document = document.WithSyntaxRoot((await document.GetSyntaxRootAsync()).WithAdditionalAnnotations(annotation)); 176var root = await document.GetSyntaxRootAsync(cancellationToken); 195var root = await document.GetSyntaxRootAsync(cancellationToken); 216var root = await document.GetSyntaxRootAsync(cancellationToken); 237var root = await document.GetSyntaxRootAsync(cancellationToken); 301var root = await document.GetSyntaxRootAsync(); 308var newRoot = await newDocument.GetSyntaxRootAsync(); 348var root = await document.GetSyntaxRootAsync(cancellationToken);
CodeCleanup\Extensions.cs (1)
27=> (T)document.GetSyntaxRootAsync().Result.GetMember(index);
CommandLineProject\CommandLineProjectWorkspaceTests.cs (1)
45var tree = await gooDoc.GetSyntaxRootAsync();
SolutionTests\SolutionTests.cs (10)
3145var root = await document.GetSyntaxRootAsync(); 3164var newRoot = await Formatter.FormatAsync(document, CSharpSyntaxFormattingOptions.Default, CancellationToken.None).Result.GetSyntaxRootAsync(); 3230var syntaxRoot = await document.GetSyntaxRootAsync(CancellationToken.None); 3441var docTree = doc.GetSyntaxRootAsync().Result; 3462var docRoot = await doc.GetSyntaxRootAsync(); 3590var observedTree = solution.GetDocument(documentId).GetSyntaxRootAsync().Result; 3616var observedTree = solution.GetDocument(documentId).GetSyntaxRootAsync().Result; 3693var newRoot = doc.GetSyntaxRootAsync().Result.WithAdditionalAnnotations(SyntaxAnnotation.ElasticAnnotation); 3996var root = doc.GetSyntaxRootAsync().Result; 5436var root = await doc.GetSyntaxRootAsync();
SyntaxNodeTests.cs (2)
94var root = await doc.GetSyntaxRootAsync(); 119var root2 = await doc.GetSyntaxRootAsync();
WorkspaceTests\AdhocWorkspaceTests.cs (1)
344var root = await doc.GetSyntaxRootAsync();
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\AddMarshalAsToElementFixer.cs (1)
26SyntaxNode? root = await doc.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
121SyntaxNode? root = await doc.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.Interop.LibraryImportGenerator (4)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
60var syntaxRoot = await assemblyInfo.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Analyzers\ConvertToLibraryImportFixer.cs (1)
277SyntaxNode root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Analyzers\CustomMarshallerAttributeFixer.cs (1)
112SyntaxNode? root = await doc.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
121SyntaxNode? root = await doc.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.ML.InternalCodeAnalyzer (2)
ContractsCheckNameofFixProvider.cs (1)
39var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
NameFixProvider.cs (1)
59var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken);
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
GoToDefinition\GoToDefinitionApiTests.vb (1)
26Dim root = Await document.GetSyntaxRootAsync()
Venus\DocumentService_IntegrationTests.vb (1)
146Dim root = Await startDocument.GetSyntaxRootAsync()
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
45SyntaxNode? root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
System.Windows.Forms.Analyzers.CodeFixes.CSharp (2)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (2)
35.GetSyntaxRootAsync(context.CancellationToken) 78SyntaxNode root = (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false))!;
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (2)
AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.vb (2)
41GetSyntaxRootAsync(context.CancellationToken). 108GetSyntaxRootAsync(cancellationToken).