505 references to GetCompilationAsync
Analyzer.Utilities.UnitTests (2)
FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisTests.cs (1)
65
Compilation? compilation = project.
GetCompilationAsync
().Result;
Options\SymbolNamesWithValueOptionTests.cs (1)
445
return project.
GetCompilationAsync
(cancellationToken).Result!;
AnalyzerRunner (4)
DiagnosticAnalyzerRunner.cs (3)
100
_ = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
185
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
393
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Program.cs (1)
150
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
IdeCoreBenchmarks (4)
FindReferencesBenchmarks.cs (1)
96
var compilation = await project.
GetCompilationAsync
();
IncrementalSourceGeneratorBenchmarks.cs (1)
143
var compilation = await project.
GetCompilationAsync
();
RenameBenchmarks.cs (1)
47
var compilation = project.
GetCompilationAsync
().Result;
SwitchStatementBenchmarks.cs (1)
75
var compilation = project.
GetCompilationAsync
().Result;
Metrics (2)
Program.cs (2)
319
var compilation = await project.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
352
var compilation = await project.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
Metrics.Legacy (2)
src\RoslynAnalyzers\Tools\Metrics\Program.cs (2)
319
var compilation = await project.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
352
var compilation = await project.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
268
var comp = (await proj.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false))!;
Microsoft.Analyzers.Extra.Tests (5)
Resources\RoslynTestUtils.cs (5)
191
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
219
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
259
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
333
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
540
var comp = await _project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.Analyzers.Local.Tests (5)
Resources\RoslynTestUtils.cs (5)
191
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
219
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
259
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
334
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
541
var comp = await _project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Analyzer.Testing (3)
CodeFixRunner.cs (1)
50
.
GetCompilationAsync
();
DiagnosticAnalyzerRunner.cs (1)
62
var compilation = await project.
GetCompilationAsync
();
DiagnosticVerifier.cs (1)
82
var compilation = await project.
GetCompilationAsync
();
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
AnalyzerTestBase.cs (1)
44
return CreateProject(source).
GetCompilationAsync
();
Helpers\DiagnosticVerifier.Helper.cs (1)
62
var compilationWithAnalyzers = project.
GetCompilationAsync
().Result.WithAnalyzers(ImmutableArray.Create(analyzer));
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
AnalyzerTestBase.cs (1)
44
return CreateProject(source).
GetCompilationAsync
();
Helpers\DiagnosticVerifier.Helper.cs (1)
62
var compilationWithAnalyzers = project.
GetCompilationAsync
().Result.WithAnalyzers(ImmutableArray.Create(analyzer));
Microsoft.AspNetCore.Http.Extensions.Tests (9)
RequestDelegateGenerator\CompileTimeCreationTests.cs (8)
58
var compilation = await project.
GetCompilationAsync
();
84
var compilation = await project.
GetCompilationAsync
();
166
var compilation = await project.
GetCompilationAsync
();
233
var compilation = await project.
GetCompilationAsync
();
287
var compilation = await project.
GetCompilationAsync
();
334
var compilation = await project.
GetCompilationAsync
();
670
var compilation = await project.
GetCompilationAsync
();
727
var compilation = await project.
GetCompilationAsync
();
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
308
return project.
GetCompilationAsync
();
Microsoft.AspNetCore.Http.Microbenchmarks (2)
RequestDelegateGeneratorBenchmarks.cs (1)
33
_compilation = await project.
GetCompilationAsync
();
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
308
return project.
GetCompilationAsync
();
Microsoft.CodeAnalysis.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (19)
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (1)
3469
var compilation = await workspace.CurrentSolution.Projects.First(p => p.Name == "P3").
GetCompilationAsync
();
PdbSourceDocument\PdbSourceDocumentTests.cs (1)
937
var compilation = await project.
GetCompilationAsync
(CancellationToken.None);
SymbolKey\SymbolKeyTests.cs (8)
46
var compilation = await project.
GetCompilationAsync
();
81
var compilation = await project.
GetCompilationAsync
();
120
var compilation = await project.
GetCompilationAsync
();
166
var compilation = await project.
GetCompilationAsync
();
260
bodyCompilation = await bodyProject.
GetCompilationAsync
();
261
referenceCompilation = await referenceProject.
GetCompilationAsync
();
265
referenceCompilation = await referenceProject.
GetCompilationAsync
();
266
bodyCompilation = await bodyProject.
GetCompilationAsync
();
Workspaces\WorkspaceTests_EditorFeatures.cs (9)
413
var compilation = await snapshot.GetProject(id1).
GetCompilationAsync
();
436
var compilation2 = await snapshot.GetProject(id2).
GetCompilationAsync
();
464
var compilation2 = await snapshot.GetProject(id2).
GetCompilationAsync
();
501
var compilation2 = await solutionY.GetProject(id2).
GetCompilationAsync
();
520
var compilation2Z = await solutionZ.GetProject(id2).
GetCompilationAsync
();
559
var compilation2y = await solutionY.GetProject(id2).
GetCompilationAsync
();
631
var compilation2y = await solutionY.GetProject(id2).
GetCompilationAsync
();
662
var compilation2Z = await partialDoc2Z.Project.
GetCompilationAsync
();
683
var compilation2Z = await doc2Z.Project.
GetCompilationAsync
();
Microsoft.CodeAnalysis.CSharp.Features (2)
AddImport\CSharpAddImportFeatureService.cs (1)
398
var compilation = await document.Project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
77
var compilation = await document.Project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
CodeGeneration\AddImportsTests.cs (1)
868
var compilation = await document.Project.
GetCompilationAsync
(CancellationToken.None);
CodeGeneration\SymbolEditorTests.cs (4)
50
var compilation = await solution.Projects.First().
GetCompilationAsync
();
178
var comp = await solution.Projects.First().
GetCompilationAsync
();
225
var comp = await solution.Projects.First().
GetCompilationAsync
();
309
var comp = await solution.Projects.First().
GetCompilationAsync
();
Microsoft.CodeAnalysis.EditorFeatures (1)
Peek\DefinitionPeekableItem.cs (1)
75
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (125)
MetadataAsSource\AbstractMetadataAsSourceTests.cs (2)
102
references.Add(MetadataReference.CreateFromImage((await metadataProject.
GetCompilationAsync
()).EmitToArray()));
125
var generatedCompilation = await generatedDocument.Project.
GetCompilationAsync
();
MetadataAsSource\MetadataAsSourceTests.cs (1)
1839
var compilation = await context.DefaultProject.
GetCompilationAsync
();
SymbolFinder\SymbolFinderTests.cs (30)
80
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
83
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
121
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
124
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
172
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
175
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
213
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
216
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
255
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
258
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
297
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
300
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
338
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
341
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
379
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
382
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
419
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
422
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
443
var compilation = await GetNormalProject(solution).
GetCompilationAsync
();
488
var compilation = await GetNormalProject(solution).
GetCompilationAsync
();
540
var compilation = await GetNormalProject(solution).
GetCompilationAsync
();
577
var compilation = await GetNormalProject(solution).
GetCompilationAsync
();
607
var compilation = await GetNormalProject(solution).
GetCompilationAsync
();
706
var compilation = await normalProject1.
GetCompilationAsync
();
760
var compilation1 = await solution.Projects.Single(p => p.Name == "PortableProject1").
GetCompilationAsync
();
761
var compilation2 = await solution.Projects.Single(p => p.Name == "PortableProject2").
GetCompilationAsync
();
793
var portableCompilation = await GetPortableProject(solution).
GetCompilationAsync
();
821
var sourceCompilation = await solution.Projects.Single(p => p.Name == "SourceProject").
GetCompilationAsync
();
865
await solution.Projects.Single(p => p.Name == "SourceProject").
GetCompilationAsync
();
869
var sourceCompilation = await solution.Projects.Single(p => p.Name == "SourceProject").
GetCompilationAsync
();
Utilities\SymbolEquivalenceComparerTests.cs (92)
53
var type = (ITypeSymbol)(await workspace.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
129
var csharpType = (ITypeSymbol)(await csharpWorkspace.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
130
var vbType = (await vbWorkspace.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
203
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
204
var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type2").Single();
205
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
206
var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type2").Single();
258
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
259
var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type2").Single();
260
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
261
var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type2").Single();
298
var typeC = (await workspace.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
299
var typeD = (await workspace.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("D").Single();
346
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
347
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
375
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
376
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
404
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
405
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
433
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
434
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
462
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
463
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
493
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
494
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
524
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
525
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
555
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
556
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
584
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
585
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
613
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
614
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
644
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
645
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
680
var csharpType1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
681
var vbType1 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
727
var csharpType1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
728
var vbType1 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
760
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
790
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
791
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
827
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
828
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
862
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
863
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
899
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
900
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
931
var outer1 = (INamespaceSymbol)(await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetMembers("Outer").Single();
932
var outer2 = (INamespaceSymbol)(await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetMembers("Outer").Single();
1009
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
1010
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
1011
var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type2").Single();
1012
var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type2").Single();
1048
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
1049
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type2").Single();
1075
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
1076
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
1102
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
1103
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
1135
var outer = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Outer").Single();
1136
var other = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Other").Single();
1167
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
1168
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("Type1").Single();
1200
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1201
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1242
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1243
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1274
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1275
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1306
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1307
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1339
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1340
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1372
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1373
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1406
var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1407
var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("C").Single();
1445
var t1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("T").Single();
1446
var t2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("T").Single();
1511
var t1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("T").Single();
1512
var t2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("T").Single();
1576
var t1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("T").Single();
1577
var t2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("T").Single();
1641
var t1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("T").Single();
1642
var t2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetTypeMembers("T").Single();
1729
var comp1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
());
1730
var comp2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
());
1803
var comp1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
());
1804
var comp2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
());
1828
var namespace1 = (await workspace1.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetNamespaceMembers().Single(n => n.Name == "N").GetNamespaceMembers().Single(n => n.Name == "M");
1829
var namespace2 = (await workspace2.CurrentSolution.Projects.Single().
GetCompilationAsync
()).GlobalNamespace.GetNamespaceMembers().Single(n => n.Name == "N").GetNamespaceMembers().Single(n => n.Name == "M");
Microsoft.CodeAnalysis.Features (17)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (3)
78
var compilation = await currentProject.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
106
var compilation = await currentProject.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
176
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.cs (1)
31
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (1)
286
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
341
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
EditAndContinue\EditSession.cs (2)
1185
var oldCompilation = await oldProject.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
1196
var newCompilation = await newProject.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (2)
42
var compilation = await document.Project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
64
var compilation = await document.Project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
377
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
229
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackFrameLocalMethodResolver.cs (1)
30
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
SymbolMapping\SymbolMappingServiceFactory.cs (1)
26
var compilation = await document.Project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
81
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Tagging\CompilationAvailableHelpers.cs (1)
16
=> s_shouldSkipComputation ? Task.CompletedTask : project.
GetCompilationAsync
(cancellationToken);
UnusedReferences\UnusedReferencesRemover.cs (1)
39
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueTestVerifier.cs (2)
278
EditSession.MergePartialEdits(oldProject.
GetCompilationAsync
().Result!, newProject.
GetCompilationAsync
().Result!, allEdits, out var mergedEdits, out _, CancellationToken.None);
Microsoft.CodeAnalysis.Features.UnitTests (34)
EditAndContinue\CompileTimeSolutionProviderTests.cs (3)
120
_ = await workspace.CurrentSolution.GetRequiredProject(projectId).
GetCompilationAsync
();
125
_ = await compileTimeSolution1.GetRequiredProject(projectId).
GetCompilationAsync
();
141
_ = await compileTimeSolution2.GetRequiredProject(projectId).
GetCompilationAsync
();
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
3702
_ = await solution.Projects.Single().
GetCompilationAsync
(CancellationToken.None);
3759
_ = await solution.Projects.Single().
GetCompilationAsync
(CancellationToken.None);
FindUsages\DefinitionItemFactoryTests.cs (29)
134
var compilation = await project.
GetCompilationAsync
();
170
var compilation = await project.
GetCompilationAsync
();
212
var compilation = await project.
GetCompilationAsync
();
248
var compilation = await project.
GetCompilationAsync
();
290
var compilation = await project.
GetCompilationAsync
();
332
var compilation = await project.
GetCompilationAsync
();
385
var compilation = await project.
GetCompilationAsync
();
439
var compilation = await project.
GetCompilationAsync
();
479
var compilation = await project.
GetCompilationAsync
();
519
var compilation = await project.
GetCompilationAsync
();
561
var compilation = await project.
GetCompilationAsync
();
619
var compilation = await project.
GetCompilationAsync
();
665
var compilation = await project.
GetCompilationAsync
();
702
var compilation = await project.
GetCompilationAsync
();
764
var compilation = await project.
GetCompilationAsync
();
820
var compilation = await project.
GetCompilationAsync
();
874
var compilation = await project.
GetCompilationAsync
();
934
var compilation = await project.
GetCompilationAsync
();
979
var compilation = await project.
GetCompilationAsync
();
1034
var compilation = await project.
GetCompilationAsync
();
1086
var compilation = await project.
GetCompilationAsync
();
1148
var compilation = await project.
GetCompilationAsync
();
1205
var compilation = await project.
GetCompilationAsync
();
1262
var compilation = await project.
GetCompilationAsync
();
1339
var compilation = await project.
GetCompilationAsync
();
1399
var compilation = await project.
GetCompilationAsync
();
1450
var compilation = await project.
GetCompilationAsync
();
1514
var compilation = await project.
GetCompilationAsync
();
1585
var compilation = await project.
GetCompilationAsync
();
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces (9)
Editing\SymbolEditor.cs (1)
153
var comp = await solution.GetProject(projectId).
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
122
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Shared\Extensions\ISolutionExtensions.cs (1)
29
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Project.cs (4)
93
/// <see cref="
GetCompilationAsync
(CancellationToken)"/> method.
95
/// If <see langword="false"/> then <see cref="
GetCompilationAsync
(CancellationToken)"/> method will return <see langword="null"/> instead.
510
/// cases you should call <see cref="
GetCompilationAsync
"/> which will either return the cached <see cref="Compilation"/>
528
/// Determines if the compilation returned by <see cref="
GetCompilationAsync
"/> and all its referenced compilation are from fully loaded projects.
Workspace\Solution\SolutionCompilationState.CompilationTracker.CompilationTrackerState.cs (1)
134
/// <see cref="Project.
GetCompilationAsync
"/> or <see cref="Project.TryGetCompilation"/> must be from a <see
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildWorkspace.cs (1)
640
var compilation = project.
GetCompilationAsync
(CancellationToken.None).WaitAndGetResult_CanCallOnBackground(CancellationToken.None);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (35)
MSBuildWorkspaceTestBase.cs (1)
137
var c1 = await p1.
GetCompilationAsync
();
NetCoreTests.cs (2)
446
var compilation = await project.
GetCompilationAsync
();
532
var compilation = await project.
GetCompilationAsync
();
VisualStudioMSBuildWorkspaceTests.cs (32)
93
var compilation = await vbProject.
GetCompilationAsync
();
233
var compilation1 = await projects[0].
GetCompilationAsync
();
234
var compilation2 = await projects[1].
GetCompilationAsync
();
327
var c2 = await p2.
GetCompilationAsync
();
354
var c2 = await p2.
GetCompilationAsync
();
381
var compilation = await project2.
GetCompilationAsync
();
499
var compilation = await project.
GetCompilationAsync
();
514
var compilation = await project.
GetCompilationAsync
();
528
var compilation = await project.
GetCompilationAsync
();
543
var compilation = await project.
GetCompilationAsync
();
558
var compilation = await project.
GetCompilationAsync
();
623
var compilation = await project.
GetCompilationAsync
();
638
var compilation = await project.
GetCompilationAsync
();
652
var compilation = await project.
GetCompilationAsync
();
667
var compilation = await project.
GetCompilationAsync
();
682
var compilation = await project.
GetCompilationAsync
();
815
var comp = await project.
GetCompilationAsync
();
833
var comp = await project.
GetCompilationAsync
();
1453
var compilation = await project.
GetCompilationAsync
();
1885
var compilation = await project.
GetCompilationAsync
();
1908
var compilation = await project.
GetCompilationAsync
();
1932
var compilation = await project.
GetCompilationAsync
();
1955
var compilation = await project.
GetCompilationAsync
();
2292
var comp = await proj.
GetCompilationAsync
();
2397
var comp = await proj.
GetCompilationAsync
();
2414
var comp = await proj.
GetCompilationAsync
();
2521
var comp = await project.
GetCompilationAsync
();
2539
var comp = await project.
GetCompilationAsync
();
2557
var comp = await project.
GetCompilationAsync
();
2575
var cscomp = await csproject.
GetCompilationAsync
();
2583
var vbcomp = await vbproject.
GetCompilationAsync
();
3209
var compilation = await project.
GetCompilationAsync
();
Microsoft.CodeAnalysis.Workspaces.UnitTests (122)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (1)
48
var compilation = await project.
GetCompilationAsync
();
FindAllDeclarationsTests.cs (1)
179
var expectedSymbol = (await solution.GetProject(submission0Id).
GetCompilationAsync
()).GlobalNamespace.GetMembers("Outer").SingleOrDefault().GetMembers("Inner").SingleOrDefault();
FindReferencesTests.cs (15)
106
var symbol = (await project.
GetCompilationAsync
()).GetTypeByMetadataName("C").GetMembers("X").First();
133
var symbol = (IFieldSymbol)(await project.
GetCompilationAsync
()).GetTypeByMetadataName("C").GetMembers("X").First();
185
var comp = await prj.
GetCompilationAsync
();
226
var comp = await prj.
GetCompilationAsync
();
292
var comp = await prj.
GetCompilationAsync
();
336
var comp = await project.
GetCompilationAsync
();
407
var interfaceMethod = (IMethodSymbol)(await netStandardProject.
GetCompilationAsync
()).GetTypeByMetadataName("N.I").GetMembers("Get").First();
458
var compilation = await project.
GetCompilationAsync
();
505
var portableCompilation = await solution.Projects.Single(p => p.Name == "PortableProject").
GetCompilationAsync
();
509
var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").
GetCompilationAsync
();
542
var comp = await project.
GetCompilationAsync
();
571
var compilation = await project.
GetCompilationAsync
();
606
var compilation = await project.
GetCompilationAsync
();
650
var compilation = await project.
GetCompilationAsync
();
696
var compilation = await project.
GetCompilationAsync
();
SolutionTests\SolutionTests.cs (79)
335
var compilation = (await project.
GetCompilationAsync
())!;
2726
Assert.Empty((await finalProject.
GetCompilationAsync
()).SyntaxTrees);
2874
var compilation = await project.
GetCompilationAsync
();
2963
await solution.GetProject(projectIds[0]).
GetCompilationAsync
(CancellationToken.None);
2964
await solution.GetProject(projectIds[2]).
GetCompilationAsync
(CancellationToken.None);
2978
var assemblyReference = (IAssemblySymbol)solution.GetProject(project1).
GetCompilationAsync
().Result.GetAssemblyOrModuleSymbol(mefReference);
2985
assemblyReference = (IAssemblySymbol)solution.GetProject(project1).
GetCompilationAsync
().Result.GetAssemblyOrModuleSymbol(mefReference);
3511
var compilation = proj.
GetCompilationAsync
().Result;
3764
var observed = solution.GetProject(projectId).
GetCompilationAsync
().Result;
3789
var observed = solution.GetProject(projectId).
GetCompilationAsync
().Result;
3957
var compilation = await doc.Project.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
4013
var comp3 = project3.
GetCompilationAsync
().Result;
4021
comp3 = project3.
GetCompilationAsync
().Result;
4050
Assert.Empty(project.
GetCompilationAsync
().Result.ExternalReferences);
4082
Assert.Equal(2, project2.
GetCompilationAsync
().Result.ExternalReferences.Length);
4111
Assert.Single(project2.
GetCompilationAsync
().Result.ExternalReferences);
4126
var tree = Assert.Single((await frozenDocument.Project.
GetCompilationAsync
()).SyntaxTrees);
4151
var tree = Assert.Single((await frozenDocument.Project.
GetCompilationAsync
()).SyntaxTrees);
4176
var compilation = await project.
GetCompilationAsync
();
4221
var compilation = await project.
GetCompilationAsync
();
4302
var originalCompilation = await project.
GetCompilationAsync
();
4324
var singleTree = Assert.Single((await frozenDocument.Project.
GetCompilationAsync
()).SyntaxTrees);
4336
var originalCompilation = await originalProject.
GetCompilationAsync
();
4347
var frozenCompilation = await frozenDocument.Project.
GetCompilationAsync
();
4360
var originalCompilation = await originalProject.
GetCompilationAsync
();
4375
var frozenCompilation = await frozenDocument.Project.
GetCompilationAsync
();
4388
var originalCompilation = await document.Project.
GetCompilationAsync
();
4393
Assert.Contains(await frozenDocument.GetSyntaxTreeAsync(), (await frozenDocument.Project.
GetCompilationAsync
()).SyntaxTrees);
4412
var originalCompilation = await solution.Projects.Single().
GetCompilationAsync
();
4427
Assert.Contains(tree, (await frozen.Project.
GetCompilationAsync
()).SyntaxTrees);
4619
return solution.GetProject(pid).
GetCompilationAsync
().Result.SyntaxTrees.ToImmutableArray();
4709
var originalCompilation = await solution.GetProject(projectId).
GetCompilationAsync
();
4721
var newCompilation = await project.
GetCompilationAsync
();
4768
var finalCompilation = await project.
GetCompilationAsync
();
4797
Assert.Equal(provider, (await project.
GetCompilationAsync
()).Options.SyntaxTreeOptionsProvider);
4810
Assert.Equal(provider, (await project.
GetCompilationAsync
()).Options.SyntaxTreeOptionsProvider);
4814
var finalCompilation = await project.
GetCompilationAsync
();
4872
var originalCompilation = await solution.GetProject(projectId).
GetCompilationAsync
();
4888
var newCompilation = await solution.GetProject(projectId).
GetCompilationAsync
();
5001
var compilation1 = await solution.GetProject(projectId1).
GetCompilationAsync
();
5002
var compilation2 = await solution.GetProject(projectId2).
GetCompilationAsync
();
5027
var compilation1 = await solution.GetProject(projectId1).
GetCompilationAsync
();
5028
var compilation2 = await solution.GetProject(projectId2).
GetCompilationAsync
();
5055
var compilation1 = await solution.GetProject(projectId1).
GetCompilationAsync
();
5056
var compilation2 = await solution.GetProject(projectId2).
GetCompilationAsync
();
5072
var compilation1 = await solution.GetProject(projectId1).
GetCompilationAsync
();
5084
var compilation1New = await solution.GetProject(projectId1).
GetCompilationAsync
();
5102
var compilation1 = await solution.GetProject(projectId1).
GetCompilationAsync
();
5115
var compilation1New = await solution.GetProject(projectId1).
GetCompilationAsync
();
5134
var compilation1 = await solution.GetProject(projectId1).
GetCompilationAsync
();
5147
var compilation1New = await solution.GetProject(projectId1).
GetCompilationAsync
();
5152
var compilation2 = await solution.GetProject(projectId2).
GetCompilationAsync
();
5153
var compilation3 = await solution.GetProject(projectId2).
GetCompilationAsync
();
5199
var compilation1 = await solution.GetProject(projectId1).
GetCompilationAsync
();
5200
var compilation2 = await solution.GetProject(projectId2).
GetCompilationAsync
();
5201
var compilation3 = await solution.GetProject(projectId2).
GetCompilationAsync
();
5216
var compilation1New = await solution.Projects.Single().
GetCompilationAsync
();
5244
var compilation1 = await solution.GetProject(projectId1).
GetCompilationAsync
();
5245
var compilation2 = await solution.GetProject(projectId2).
GetCompilationAsync
();
5246
var compilation3 = await solution.GetProject(projectId2).
GetCompilationAsync
();
5260
var compilation1New = await solution.Projects.Single().
GetCompilationAsync
();
5511
var originalCompilation = await solution.Projects.Single().
GetCompilationAsync
();
5632
var frozenCompilation = await frozenProject.
GetCompilationAsync
();
5643
await project.
GetCompilationAsync
();
5651
var frozenCompilation = await frozenProject.
GetCompilationAsync
();
5667
await project1.
GetCompilationAsync
();
5676
var frozenCompilation1 = await frozenProject1.
GetCompilationAsync
();
5680
var frozenCompilation2 = await frozenProject2.
GetCompilationAsync
();
5697
await project1.
GetCompilationAsync
();
5703
var frozenCompilation1 = await frozenProject1.
GetCompilationAsync
();
5710
var frozenCompilation2 = await frozenProject2.
GetCompilationAsync
();
5727
await project2.
GetCompilationAsync
();
5733
var frozenCompilation1 = await frozenProject1.
GetCompilationAsync
();
5740
var frozenCompilation2 = await frozenProject2.
GetCompilationAsync
();
5756
var compilation1 = await project1.
GetCompilationAsync
();
5767
var forkedCompilation1 = await forkedProject1.
GetCompilationAsync
();
5789
var compilation1 = await project1.
GetCompilationAsync
();
5808
var forkedCompilation1 = await forkedProject1.
GetCompilationAsync
();
5836
var frozenCompilation = await frozenProject.
GetCompilationAsync
();
SolutionTests\SolutionWithSourceGeneratorTests.cs (13)
462
await project.
GetCompilationAsync
();
531
_ = await project.
GetCompilationAsync
();
753
var objectReference = await project.
GetCompilationAsync
();
782
var objectReference = await project.
GetCompilationAsync
();
854
_ = await project.
GetCompilationAsync
();
988
var objectReference = await project.
GetCompilationAsync
();
1020
var objectReference = await project.
GetCompilationAsync
();
1051
var objectReference = await project.
GetCompilationAsync
();
1090
var objectReference = await project.
GetCompilationAsync
();
1118
var objectReference = await project.
GetCompilationAsync
();
1145
var objectReference = await project.
GetCompilationAsync
();
1173
var objectReference = await project.
GetCompilationAsync
();
1207
var objectReference = await project.
GetCompilationAsync
();
SolutionTests\SourceGeneratorTelemetryCollectorWorkspaceServiceTests.cs (1)
34
_ = await project.
GetCompilationAsync
();
WorkspaceTests\AdhocWorkspaceTests.cs (2)
383
var comp = await proj.
GetCompilationAsync
();
605
var comp = (await vbProj.
GetCompilationAsync
())!;
WorkspaceTests\WorkspaceReferenceTests.cs (10)
31
var compilation1 = await project.
GetCompilationAsync
();
39
var compilation2 = await document.Project.
GetCompilationAsync
();
71
var compilation1 = await project.
GetCompilationAsync
();
79
var compilation2 = await document.Project.
GetCompilationAsync
();
111
var compilation1 = await project.
GetCompilationAsync
();
119
var compilation2 = await document.Project.
GetCompilationAsync
();
151
var compilation1 = await project.
GetCompilationAsync
();
163
var compilation2 = await document.Project.
GetCompilationAsync
();
184
var compilation1 = await project.
GetCompilationAsync
();
195
var compilation2 = await forkedProject.
GetCompilationAsync
();
Microsoft.Gen.ComplianceReports.Unit.Tests (5)
test\Generators\Shared\RoslynTestUtils.cs (5)
276
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
320
Compilation? comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
369
var comp = await proj.
GetCompilationAsync
().ConfigureAwait(false);
409
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
473
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
Microsoft.Gen.ContextualOptions.Unit.Tests (5)
test\Generators\Shared\RoslynTestUtils.cs (5)
276
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
320
Compilation? comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
369
var comp = await proj.
GetCompilationAsync
().ConfigureAwait(false);
409
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
473
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
Microsoft.Gen.Logging.Unit.Tests (5)
test\Generators\Shared\RoslynTestUtils.cs (5)
276
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
320
Compilation? comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
369
var comp = await proj.
GetCompilationAsync
().ConfigureAwait(false);
409
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
473
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
Microsoft.Gen.MetadataExtractor.Unit.Tests (5)
test\Generators\Shared\RoslynTestUtils.cs (5)
276
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
320
Compilation? comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
369
var comp = await proj.
GetCompilationAsync
().ConfigureAwait(false);
409
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
473
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
Microsoft.Gen.Metrics.Unit.Tests (5)
test\Generators\Shared\RoslynTestUtils.cs (5)
276
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
320
Compilation? comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
369
var comp = await proj.
GetCompilationAsync
().ConfigureAwait(false);
409
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
473
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
Microsoft.Gen.MetricsReports.Unit.Tests (5)
test\Generators\Shared\RoslynTestUtils.cs (5)
276
var comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
320
Compilation? comp = await proj!.
GetCompilationAsync
(CancellationToken.None).ConfigureAwait(false);
369
var comp = await proj.
GetCompilationAsync
().ConfigureAwait(false);
409
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
473
var comp = await proj!.
GetCompilationAsync
().ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices (25)
CallHierarchy\Finders\AbstractCallFinder.cs (1)
101
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
DebuggerIntelliSense\AbstractDebuggerIntelliSenseContext.cs (1)
173
document.Project.
GetCompilationAsync
(System.Threading.CancellationToken.None);
Interactive\VsResetInteractive.cs (1)
307
var compilation = await document.Project.
GetCompilationAsync
().ConfigureAwait(true);
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
42
=> _project.
GetCompilationAsync
(cancellationToken);
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
485
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(true);
511
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(true);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (2)
209
return await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(true);
546
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Library\ObjectBrowser\ObjectList.cs (2)
684
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(true);
752
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Library\ObjectBrowser\ObjectListItem.cs (1)
79
return await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(true);
PullMemberUp\SymbolDependentsBuilder.cs (1)
60
var compilation = await _project.
GetCompilationAsync
(_cancellationToken).ConfigureAwait(false);
Venus\ContainedLanguageCodeSupport.cs (12)
46
var type = document.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken).GetTypeByMetadataName(className);
59
var type = document.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken).GetTypeByMetadataName(className);
89
var compilation = document.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken);
157
var thisCompilation = thisDocument.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken);
193
returnType: targetDocument.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken).GetSpecialType(SpecialType.System_Void),
260
var type = thisDocument.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken).GetTypeByMetadataName(className);
293
var type = document.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken).GetTypeByMetadataName(className);
295
var compilation = document.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken);
416
return document.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken).GetTypeByMetadataName(fullyQualifiedName);
422
var type = document.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken).GetTypeByMetadataName(typeName);
428
var ns = document.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken).GlobalNamespace;
480
var compilation = document.Project.
GetCompilationAsync
(cancellationToken).WaitAndGetResult_Venus(cancellationToken);
Workspace\VisualStudioSymbolNavigationService.cs (1)
103
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.Implementation (6)
CodeModel\CodeTypeRef.cs (1)
83
var arrayType = project.
GetCompilationAsync
().Result.CreateArrayTypeSymbol(LookupTypeSymbol(), rank);
CodeModel\Collections\ExternalMemberCollection.cs (1)
53
if (_typeSymbolId.Resolve(project.
GetCompilationAsync
().Result).Symbol is not ITypeSymbol typeSymbol)
CodeModel\Collections\ExternalNamespaceEnumerator.cs (2)
67
if (namespaceSymbolId.Resolve(project.
GetCompilationAsync
().Result).Symbol is not INamespaceSymbol namespaceSymbol)
72
var containingAssembly = project.
GetCompilationAsync
().Result.Assembly;
CodeModel\ExternalElements\AbstractExternalCodeElement.cs (1)
43
return project.
GetCompilationAsync
(CancellationToken.None).Result;
CodeModel\RootCodeModel.cs (1)
43
=> GetProject().
GetCompilationAsync
();
Mvc.Api.Analyzers.Test (8)
ActualApiResponseMetadataFactoryTest.cs (3)
70
var compilation = await project.
GetCompilationAsync
();
406
var compilation = await project.
GetCompilationAsync
();
427
return project.
GetCompilationAsync
();
ApiControllerFactsTest.cs (2)
35
var compilation = await project.
GetCompilationAsync
();
131
return project.
GetCompilationAsync
();
MvcFactsTest.cs (1)
225
return project.
GetCompilationAsync
();
SymbolApiConventionMatcherTest.cs (1)
558
return project.
GetCompilationAsync
();
SymbolApiResponseMetadataProviderTest.cs (1)
479
return project.
GetCompilationAsync
();
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);
Roslyn.Diagnostics.CSharp.Analyzers (1)
CSharpDoNotUseDebugAssertForInterpolatedStringsFixer.cs (1)
31
var compilation = await context.Document.Project.
GetCompilationAsync
(context.CancellationToken).ConfigureAwait(false);
Roslyn.VisualStudio.Next.UnitTests (12)
Remote\SnapshotSerializationTests.cs (1)
594
var compilation = await recovered.Projects.First().
GetCompilationAsync
(CancellationToken.None);
Services\ServiceHubServicesTests.cs (8)
477
var localCompilation = await localProject.
GetCompilationAsync
();
481
var remoteCompilation = await remoteProject.
GetCompilationAsync
();
739
var compilation = await project.
GetCompilationAsync
();
750
compilation = await project.
GetCompilationAsync
();
823
var compilation = await project.
GetCompilationAsync
();
834
compilation = await project.
GetCompilationAsync
();
878
var compilation = await project.
GetCompilationAsync
();
890
compilation = await project.
GetCompilationAsync
();
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (3)
162
(await project.
GetCompilationAsync
()).WithAnalyzers(
202
(await project.
GetCompilationAsync
()).WithAnalyzers(analyzers, project.AnalyzerOptions),
232
var compilationWithAnalyzers = (await project.
GetCompilationAsync
()).WithAnalyzers(
Test.Utilities (1)
CodeMetricsTestsBase.cs (1)
75
var compilation = project.
GetCompilationAsync
(CancellationToken.None).Result!;
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111
var compilation = await project.
GetCompilationAsync
(cancellationToken).ConfigureAwait(false);