138 references to GetSyntaxTreeAsync
AnalyzerRunner (2)
DiagnosticAnalyzerRunner.cs (1)
192SyntaxTree tree = await project.GetDocument(documentId).GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Program.cs (1)
206var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
IdeBenchmarks (1)
RegexClassifierBenchmarks.cs (1)
80var tree = await document.GetSyntaxTreeAsync();
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticAnalyzerRunner.cs (1)
98var tree = await document.GetSyntaxTreeAsync();
DiagnosticVerifier.cs (1)
121var tree = await document.GetSyntaxTreeAsync();
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
75var tree = document.GetSyntaxTreeAsync().Result;
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
75var tree = document.GetSyntaxTreeAsync().Result;
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
67syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
27var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Workspaces\WorkspaceTests_EditorFeatures.cs (2)
250var tree = await currentSnapshot.Projects.First().Documents.First().GetSyntaxTreeAsync(); 707var syntaxTree = await doc.GetSyntaxTreeAsync(CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.Features (4)
Debugging\CSharpBreakpointResolutionService.cs (1)
35var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Debugging\CSharpProximityExpressionsService.cs (1)
94var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Debugging\LocationInfoGetter.cs (1)
24var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
MetadataAsSource\CSharpMetadataAsSourceService.cs (1)
103var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
747var newSyntaxTree = await newDocument.GetSyntaxTreeAsync().ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Formatting\FormattingMultipleSpanTests.cs (1)
167var syntaxTree = await document.GetSyntaxTreeAsync();
Microsoft.CodeAnalysis.EditorFeatures (3)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (2)
185var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 208var syntaxTreeWithOriginalName = await documentWithOriginalName.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (1)
169var syntaxTree = await document.GetSyntaxTreeAsync(_cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
CodeDefinitionWindow\AbstractCodeDefinitionWindowTests.vb (1)
51Dim tree = Await document.GetSyntaxTreeAsync()
Microsoft.CodeAnalysis.Features (9)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (1)
84var t = await document.GetSyntaxTreeAsync(c).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
265var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
69var currentTree = await currentDocument.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (1)
96var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (1)
60var syntaxTree = await context.Document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractKeywordCompletionProvider.cs (1)
57var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
555var newTree = await newDocument.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (1)
57var syntaxTree = await _document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Structure\BlockStructureServiceWithProviders.cs (1)
51var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features.UnitTests (6)
FindUsages\DefinitionItemFactoryTests.cs (6)
929var tree = await document.GetSyntaxTreeAsync(); 1334var tree = await document.GetSyntaxTreeAsync(); 1394var tree = await document.GetSyntaxTreeAsync(); 1445var tree = await document.GetSyntaxTreeAsync(); 1509var tree = await document.GetSyntaxTreeAsync(); 1580var tree = await document.GetSyntaxTreeAsync();
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (1)
261var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Handler\Breakpoints\ValidateBreakableRangeHandler.cs (1)
61var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
53Dim syntaxTree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.VisualBasic.Features (11)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
101Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
CodeRefactorings\NodeSelectionHelpers.vb (1)
44Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Completion\CompletionProviders\CrefCompletionProvider.vb (2)
62Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 101Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
50Dim syntaxTree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (1)
70Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Debugging\LocationInfoGetter.vb (1)
19Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Debugging\ProximityExpressionsGetter.vb (1)
29Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Debugging\VisualBasicBreakpointService.vb (1)
28Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
ExtractInterface\VisualBasicExtractInterfaceService.vb (1)
30Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
LineSeparators\VisualBasicLineSeparatorService.vb (1)
58Dim syntaxTree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Formatting\VisualBasicFormattingTestBase.vb (1)
59Dim syntaxTree = Await document.GetSyntaxTreeAsync()
Microsoft.CodeAnalysis.Workspaces (8)
Diagnostics\Extensions.cs (1)
119treeToAnalyze = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
67syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
27var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Document.cs (5)
76/// In almost all cases, you should call <see cref="GetSyntaxTreeAsync"/> to fetch the tree, which will parse the tree 139/// <see cref="GetSyntaxTreeAsync"/> and <see cref="GetSyntaxRootAsync"/> methods. 234var tree = (await this.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false))!; 477var tree = useAsync ? await GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false) : this.GetSyntaxTreeSynchronously(cancellationToken); 478var oldTree = useAsync ? await oldDocument.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false) : oldDocument.GetSyntaxTreeSynchronously(cancellationToken);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (9)
VisualStudioMSBuildWorkspaceTests.cs (9)
61var tree = await document.GetSyntaxTreeAsync(); 437var tree = await document.GetSyntaxTreeAsync(); 458var tree = await document.GetSyntaxTreeAsync(); 476var tree = await document.GetSyntaxTreeAsync(); 895var tree = await document.GetSyntaxTreeAsync(); 914var tree = await document.GetSyntaxTreeAsync(); 2847var tree = document.UseReference(static d => d.GetSyntaxTreeAsync().Result); 2887var doc2tree = await doc2.GetSyntaxTreeAsync(); 2900var doc3tree = await doc3.GetSyntaxTreeAsync();
Microsoft.CodeAnalysis.Workspaces.UnitTests (48)
BatchFixAllProviderTests.cs (1)
120var tree = await document.GetSyntaxTreeAsync(cancellationToken);
FindReferencesTests.cs (3)
178tree = await prj.GetDocument(docId).GetSyntaxTreeAsync(); 217tree = await prj.GetDocument(docId).GetSyntaxTreeAsync(); 281tree = await prj.GetDocument(docId).GetSyntaxTreeAsync();
SolutionTests\SolutionTests.cs (35)
2882Assert.True(trees.Contains(await doc.GetSyntaxTreeAsync()), "trees list was expected to contain the syntax tree of doc"); 3187var tree = document.GetSyntaxTreeAsync().Result; 3195var tree2 = doc2.GetSyntaxTreeAsync().Result; 3246var tree = await documentWithAttribute.GetSyntaxTreeAsync(CancellationToken.None); 3272Assert.Equal(OldFilePath, oldDocument.GetSyntaxTreeAsync().Result.FilePath); 3280Assert.Equal(NewFilePath, newDocument.GetSyntaxTreeAsync().Result.FilePath); 3399var docTree = doc.GetSyntaxTreeAsync().Result; 3420var docTree = doc.GetSyntaxTreeAsync().Result; 3684var tree = doc.GetSyntaxTreeAsync().Result; 3701var tree2 = doc2.GetSyntaxTreeAsync().Result; 4135var tree = await documentToFreezeChanged.GetSyntaxTreeAsync(); 4180var tree = await documentToFreezeChanged.GetSyntaxTreeAsync(); 4276Assert.Same(await frozenDocument.GetSyntaxTreeAsync(), singleTree); 4299Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenDocument.GetSyntaxTreeAsync())); 4300Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4327Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenDocument.GetSyntaxTreeAsync())); 4328Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4344Assert.Contains(await frozenDocument.GetSyntaxTreeAsync(), (await frozenDocument.Project.GetCompilationAsync()).SyntaxTrees); 4679var originalSyntaxTree = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4690var newSyntaxTree = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4723var syntaxTreeAfterAddingEditorConfig = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4734var syntaxTreeAfterRemovingEditorConfig = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4764var syntaxTreeBeforeEditorConfigChange = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4777var syntaxTreeAfterEditorConfigChange = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4842var originalSyntaxTree = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4858var newSyntaxTree = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 5446var newDocTree = await newDoc.GetSyntaxTreeAsync(); 5607Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenProject.Documents.Single().GetSyntaxTreeAsync())); 5632Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5659Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5689Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5696Assert.True(frozenCompilation2.ContainsSyntaxTree(await frozenProject2.Documents.Single().GetSyntaxTreeAsync())); 5711var syntaxTree1 = await project1.Documents.Single().GetSyntaxTreeAsync(); 5717var forkedSyntaxTree1 = await forkedDocument1.GetSyntaxTreeAsync(); 5744var syntaxTree1 = await project1.Documents.Single().GetSyntaxTreeAsync();
SolutionTests\SolutionWithSourceGeneratorTests.cs (9)
73Assert.Same(generatedTree, await generatedDocument.GetSyntaxTreeAsync()); 450Assert.Same(syntaxTree, await generatedDocument.GetSyntaxTreeAsync()); 473Assert.Same(syntaxTree, await generatedDocument.GetSyntaxTreeAsync()); 486var generatedTreeBeforeChange = await Assert.Single(await project.GetSourceGeneratedDocumentsAsync()).GetSyntaxTreeAsync(); 491var generatedTreeAfterChange = await Assert.Single(await project.GetSourceGeneratedDocumentsAsync()).GetSyntaxTreeAsync(); 506var generatedTreeBeforeChange = await Assert.Single(await project.GetSourceGeneratedDocumentsAsync()).GetSyntaxTreeAsync(); 512var generatedTreeAfterChange = await Assert.Single(await project.GetSourceGeneratedDocumentsAsync()).GetSyntaxTreeAsync(); 603var generatedTree = await generatedDocument.GetSyntaxTreeAsync(); 650var generatedTree = await generatedDocument.GetSyntaxTreeAsync();
Microsoft.ML.InternalCodeAnalyzer (2)
ContractsCheckNameofFixProvider.cs (2)
170var tree = await document.GetSyntaxTreeAsync(cancellationToken); 181var tree = await document.GetSyntaxTreeAsync(cancellationToken);
Microsoft.VisualStudio.LanguageServices (2)
Progression\GraphBuilder.cs (1)
204var syntaxTree = await contextDocument.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Progression\SymbolContainment.cs (1)
25var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
CodeModel\FileCodeFunctionTests.cs (2)
496var tree = await (GetCurrentDocument()).GetSyntaxTreeAsync(); 509var tree = await (GetCurrentDocument()).GetSyntaxTreeAsync();
Microsoft.VisualStudio.LanguageServices.UnitTests (14)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
466Dim tree = Await workspaceDoc.GetSyntaxTreeAsync()
CodeModel\AbstractEventCollectorTests.vb (2)
109Dim codeTree = Await codeDocument.GetSyntaxTreeAsync() 112Dim changeTree = Await changeDocument.GetSyntaxTreeAsync()
CodeModel\CSharp\FileCodeModelTests.vb (1)
1023Dim changeTree = Await changeDocument.GetSyntaxTreeAsync()
CodeModel\CSharp\SyntaxNodeKeyTests.vb (1)
240Dim tree = Await document.GetSyntaxTreeAsync()
CodeModel\VisualBasic\FileCodeModelTests.vb (2)
1021Dim changeTree = Await changeDocument.GetSyntaxTreeAsync() 1037changeTree = Await changeDocument.GetSyntaxTreeAsync()
CommonControls\MemberSelectionViewModelTests.vb (1)
182Dim tree = Await workspaceDoc.GetSyntaxTreeAsync()
CommonControls\NewTypeDestinationSelectionViewModelTests.vb (1)
235Dim tree = Await workspaceDoc.GetSyntaxTreeAsync()
ExtractInterface\ExtractInterfaceViewModelTests.vb (1)
298Dim tree = Await workspaceDoc.GetSyntaxTreeAsync()
GenerateType\GenerateTypeViewModelTests.vb (1)
843Dim tree = Await document.GetSyntaxTreeAsync()
MoveStaticMembers\MoveStaticMembersViewModelTest.vb (1)
33Dim tree = Await workspaceDoc.GetSyntaxTreeAsync().ConfigureAwait(False)
PullMemberUp\PullMemberUpViewModelTest.vb (1)
254Dim tree = Await workspaceDoc.GetSyntaxTreeAsync()
RQName\RQNameTests.vb (1)
246Dim tree = Await workspaceDoc.GetSyntaxTreeAsync()
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
Help\VisualBasicHelpContextService.vb (1)
40Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Snippets\SnippetCompletionProvider.vb (1)
59Dim syntaxTree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)