1667 references to CurrentSolution
Analyzer.Utilities.UnitTests (2)
FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisTests.cs (1)
1299
Project project = new AdhocWorkspace().
CurrentSolution
Options\SymbolNamesWithValueOptionTests.cs (1)
423
var project = new AdhocWorkspace().
CurrentSolution
AnalyzerRunner (6)
CodeRefactoringRunner.cs (1)
52
var solution = _workspace.
CurrentSolution
;
DiagnosticAnalyzerRunner.cs (2)
66
var solution = _workspace.
CurrentSolution
;
80
var solution = _workspace.
CurrentSolution
;
IncrementalAnalyzerRunner.cs (1)
46
var persistentStorage = await persistentStorageService.GetStorageAsync(SolutionKey.ToSolutionKey(_workspace.
CurrentSolution
), cancellationToken).ConfigureAwait(false);
Program.cs (2)
93
ShowSolutionStatistics(workspace.
CurrentSolution
, cancellationToken);
99
await ShowCompilerDiagnosticsAsync(workspace.
CurrentSolution
, cancellationToken).ConfigureAwait(false);
IdeBenchmarks (6)
FormatterBenchmarks.cs (2)
47
var document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id);
60
var document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id);
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (1)
130
var items = await BenchmarksHelpers.GenerateInheritanceMarginItemsAsync(workspace.
CurrentSolution
, cancellationToken).ConfigureAwait(false);
RegexClassifierBenchmarks.cs (1)
73
var document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id);
SQLitePersistentStorageBenchmark.cs (2)
68
var solution = _workspace.
CurrentSolution
;
72
_document = _workspace.
CurrentSolution
.Projects.Single().Documents.Single();
IdeCoreBenchmarks (13)
FindReferencesBenchmarks.cs (1)
87
var storage = await storageService.GetStorageAsync(SolutionKey.ToSolutionKey(_workspace.
CurrentSolution
), CancellationToken.None);
FormatterBenchmarks.cs (1)
49
var solution = new AdhocWorkspace().
CurrentSolution
IncrementalSourceGeneratorBenchmarks.cs (1)
145
var project = _workspace.
CurrentSolution
.Projects.Single(p => p.Name == "Microsoft.CodeAnalysis.Workspaces(netstandard2.0)");
NavigateToBenchmarks.cs (7)
86
var docCount = _workspace.
CurrentSolution
.Projects.SelectMany(p => p.Documents).Count();
111
foreach (var project in _workspace.
CurrentSolution
.Projects)
145
foreach (var project in _workspace.
CurrentSolution
.Projects)
164
foreach (var project in _workspace.
CurrentSolution
.Projects)
186
var storage = await storageService.GetStorageAsync(SolutionKey.ToSolutionKey(_workspace.
CurrentSolution
), CancellationToken.None);
191
var tasks = _workspace.
CurrentSolution
.Projects.SelectMany(p => p.Documents).Select(d => Task.Run(
215
var solution = _workspace.
CurrentSolution
;
ProjectOperationBenchmarks.cs (1)
58
var solution = _workspace.
CurrentSolution
;
RenameBenchmarks.cs (1)
43
_solution = new AdhocWorkspace().
CurrentSolution
SwitchStatementBenchmarks.cs (1)
67
var solution = workspace.
CurrentSolution
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticProject.cs (1)
42
.
CurrentSolution
DiagnosticVerifier.cs (1)
160
Solution = Solution ?? new AdhocWorkspace().
CurrentSolution
;
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
152
.
CurrentSolution
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
152
.
CurrentSolution
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
320
var project = new AdhocWorkspace().
CurrentSolution
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
320
var project = new AdhocWorkspace().
CurrentSolution
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
180
var updatedDocument = workspace.
CurrentSolution
.GetRequiredDocument(document.Id);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (227)
Classification\SemanticClassifierTests.cs (2)
38
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
3912
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
Classification\SyntacticClassifierTests.cs (3)
25
var document = workspace.
CurrentSolution
.Projects.First().Documents.First();
6211
var document = workspace.
CurrentSolution
.Projects.First().Documents.First();
6241
var document = workspace.
CurrentSolution
.Projects.First().Documents.First();
Classification\TotalClassifierTests.cs (1)
37
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
CodeActions\ApplyChangesOperationTests.cs (1)
241
var originalSolution = workspace.
CurrentSolution
;
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (1)
918
var documentToModify = workspace.
CurrentSolution
.GetDocument(documentToModifyId);
CodeGeneration\SyntaxGeneratorTests.cs (2)
35
var solution = workspace.
CurrentSolution
;
69
var solution = workspace.
CurrentSolution
;
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
186
var document = workspace.
CurrentSolution
.GetDocument(documentId);
Completion\CompletionProviders\CrefCompletionProviderTests.cs (1)
446
var document = workspace.
CurrentSolution
.GetRequiredDocument(hostDocument.Id);
Completion\CompletionProviders\ObjectInitializerCompletionProviderTests.cs (2)
690
var document = workspace.
CurrentSolution
.GetDocument(hostDocument.Id);
1350
var document = workspace.
CurrentSolution
.GetDocument(hostDocument.Id);
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (10)
3006
var solution = testWorkspace.
CurrentSolution
;
3489
var solution = testWorkspace.
CurrentSolution
;
3548
var solution = testWorkspace.
CurrentSolution
;
3845
var document = workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id);
3979
var compilation = await workspace.
CurrentSolution
.Projects.First(p => p.Name == "P3").GetCompilationAsync();
3984
var p1 = workspace.
CurrentSolution
.Projects.First(p => p.Name == "P1");
3990
var document = workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id);
4037
var origComp = await workspace.
CurrentSolution
.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None);
4042
var project = workspace.
CurrentSolution
.Projects.Single();
4048
var document = workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id);
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (2)
376
var document = workspace.
CurrentSolution
.GetDocument(testDocument.Id);
387
var currentDocument = workspace.
CurrentSolution
.GetDocument(testDocument.Id);
Completion\CompletionServiceTests.cs (7)
51
var document = workspace.
CurrentSolution
109
var document = workspace.
CurrentSolution
135
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
.WithOptions(
136
workspace.
CurrentSolution
.Options.WithChangedOption(new OptionKey(ThirdPartyOption.Instance, LanguageNames.CSharp), 1))));
138
var document = workspace.
CurrentSolution
.GetDocument(testDocument.Id);
206
var project = SolutionUtilities.AddEmptyProject(workspace.
CurrentSolution
)
212
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
Debugging\LocationInfoGetterTests.cs (1)
29
workspace.
CurrentSolution
.Projects.Single().Documents.Single(),
Debugging\NameResolverTests.cs (2)
24
var nameResolver = new BreakpointResolver(workspace.
CurrentSolution
, searchText);
36
var results = await debugInfo.ResolveBreakpointsAsync(workspace.
CurrentSolution
, "goo", CancellationToken.None);
Debugging\ProximityExpressionsGetterTests.cs (1)
76
var document = workspace.
CurrentSolution
.GetDocument(testDocument.Id);
DecompiledSource\DecompiledSourceFormattingTests.cs (1)
256
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (18)
61
var newSolution = workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference])
65
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
92
ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
94
var ideEngineDocument = ideEngineWorkspace.
CurrentSolution
.Projects.Single().Documents.Single();
107
var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.
CurrentSolution
.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result;
128
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
130
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
166
var additionalDocId = DocumentId.CreateNewId(workspace.
CurrentSolution
.Projects.Single().Id);
172
workspace.TryApplyChanges(workspace.
CurrentSolution
176
var sourceDocument = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
204
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
206
var ideEngineDocument = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
260
ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
262
var ideEngineDocument = ideEngineWorkspace.
CurrentSolution
.Projects.Single().Documents.Single();
281
var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.
CurrentSolution
.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result;
340
var compilerEngineCompilation = (CSharpCompilation)(await compilerEngineWorkspace.
CurrentSolution
.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None));
759
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences(
764
var project = workspace.
CurrentSolution
.Projects.Single();
EditAndContinue\ActiveStatementTrackingServiceTests.cs (1)
66
var solution = workspace.
CurrentSolution
;
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (3)
39
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
53
var solution = workspace.
CurrentSolution
;
363
var solution = workspace.
CurrentSolution
;
EncapsulateField\EncapsulateFieldTestState.cs (1)
35
TargetDocument = Workspace.
CurrentSolution
.GetDocument(_testDocument.Id);
ExtractMethod\ExtractMethodBase.cs (3)
123
var document = workspace.
CurrentSolution
.GetDocument(testDocument.Id);
163
var document = workspace.
CurrentSolution
.GetDocument(testDocument.Id);
188
var document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id);
ExtractMethod\ExtractMethodTests.cs (1)
11481
var solution = new AdhocWorkspace().
CurrentSolution
;
Formatting\CodeCleanupTests.cs (5)
787
var project = workspace.
CurrentSolution
.Projects.Single();
807
var document = workspace.
CurrentSolution
.GetDocument(hostdoc.Id);
824
var document = workspace.
CurrentSolution
.GetDocument(hostdoc.Id);
884
var solution = workspace.
CurrentSolution
.WithAnalyzerReferences(
906
var document = workspace.
CurrentSolution
.GetDocument(hostdoc.Id);
Formatting\FormattingEngineTests.cs (1)
439
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
Formatting\Indentation\SmartIndenterEnterOnTokenTests.cs (2)
1405
var document = workspace.
CurrentSolution
.GetDocument(hostdoc.Id);
1446
var document = workspace.
CurrentSolution
.GetDocument(hostdoc.Id);
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (1)
3418
var document = workspace.
CurrentSolution
.GetDocument(testDocument.Id);
Intents\IntentTestsBase.cs (2)
106
var priorDocument = workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id);
117
var textDiffService = workspace.
CurrentSolution
.Services.GetRequiredService<IDocumentTextDifferencingService>();
LineSeparators\LineSeparatorTests.cs (1)
598
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
MoveToNamespace\MoveToNamespaceTests.cs (1)
1446
var document = workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id);
NavigateTo\NavigateToSearcherTests.cs (11)
145
workspace.
CurrentSolution
,
185
workspace.
CurrentSolution
,
222
workspace.
CurrentSolution
,
259
workspace.
CurrentSolution
,
290
workspace.
CurrentSolution
,
348
workspace.
CurrentSolution
,
391
var project = workspace.
CurrentSolution
.Projects.Single();
399
workspace.
CurrentSolution
,
451
var project = workspace.
CurrentSolution
.Projects.Single();
459
workspace.
CurrentSolution
,
543
public INavigableItem.NavigableDocument Document => INavigableItem.NavigableDocument.FromDocument(workspace.
CurrentSolution
.Projects.Single().Documents.Single());
OnTheFlyDocs\OnTheFlyDocsUtilitiesTests.cs (3)
32
var solution = workspace.
CurrentSolution
;
68
var solution = workspace.
CurrentSolution
;
114
var solution = workspace.
CurrentSolution
;
Organizing\AbstractOrganizerTests.cs (1)
29
var document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id);
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (2)
168
var document = masWorkspace!.
CurrentSolution
.GetRequiredDocument(info.DocumentId);
223
var project = workspace.
CurrentSolution
.Projects.First();
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (10)
170
var implProject = workspace.
CurrentSolution
.Projects.First();
237
var implProject = workspace.
CurrentSolution
.Projects.First();
298
var implProject = workspace.
CurrentSolution
.Projects.First();
353
var implProject = workspace.
CurrentSolution
.Projects.First();
404
var implProject = workspace.
CurrentSolution
.Projects.First();
469
var implProject = workspace.
CurrentSolution
.Projects.First();
527
var implProject = workspace.
CurrentSolution
.Projects.First();
534
implProject = workspace.
CurrentSolution
.Projects.First().AddMetadataReference(MetadataReference.CreateFromFile(dllFilePath));
542
implProject = workspace.
CurrentSolution
.Projects.First();
548
implProject = workspace.
CurrentSolution
.Projects.First().AddMetadataReference(MetadataReference.CreateFromFile(realImplementationDllFilePath));
PdbSourceDocument\PdbSourceDocumentTests.cs (3)
484
var implProject = workspace.
CurrentSolution
.Projects.First();
531
var implProject = workspace.
CurrentSolution
.Projects.First();
936
var project = workspace.
CurrentSolution
.Projects.First();
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (2)
211
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
215
var document = workspace.
CurrentSolution
.Projects.First().Documents.First();
QuickInfo\SemanticQuickInfoSourceTests.cs (3)
52
var document = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
133
var document = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
302
var document = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
QuickInfo\SyntacticQuickInfoSourceTests.cs (1)
604
var document = workspace.
CurrentSolution
.Projects.First().Documents.First();
Rename\CSharpInlineRenameServiceTests.cs (1)
63
var document = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
StringIndentation\StringIndentationTests.cs (1)
30
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
SymbolKey\SymbolKeyTests.cs (5)
43
var solution = workspace.
CurrentSolution
;
78
var solution = workspace.
CurrentSolution
;
117
var solution = workspace.
CurrentSolution
;
163
var solution = workspace.
CurrentSolution
;
194
var solution = workspace.
CurrentSolution
;
Workspaces\WorkspaceTests_EditorFeatures.cs (106)
62
var solution = workspace.
CurrentSolution
;
74
Assert.Equal(solution, workspace.
CurrentSolution
);
84
var solution = workspace.
CurrentSolution
;
91
solution = workspace.
CurrentSolution
;
100
var solution = workspace.
CurrentSolution
;
106
solution = workspace.
CurrentSolution
;
115
var solution = workspace.
CurrentSolution
;
120
solution = workspace.
CurrentSolution
;
122
solution = workspace.
CurrentSolution
;
131
var solution = workspace.
CurrentSolution
;
142
var solution = workspace.
CurrentSolution
;
156
var solution = workspace.
CurrentSolution
;
183
var solution = workspace.
CurrentSolution
;
222
workspace.TryApplyChanges(workspace.
CurrentSolution
);
225
var tree1 = await workspace.
CurrentSolution
232
var tree2 = await workspace.
CurrentSolution
241
var currentSnapshot = workspaceSnapshotBuilder.
CurrentSolution
;
259
var solution = workspace.
CurrentSolution
;
273
var solution = workspace.
CurrentSolution
;
284
var snapshot = workspace.
CurrentSolution
;
295
var solution = workspace.
CurrentSolution
;
312
var solution = workspace.
CurrentSolution
;
323
var snapshot = workspace.
CurrentSolution
;
334
var solution = workspace.
CurrentSolution
;
351
var solution = workspace.
CurrentSolution
;
361
Assert.Empty(workspace.
CurrentSolution
.Projects);
368
var solution = workspace.
CurrentSolution
;
383
var solution = workspace.
CurrentSolution
;
393
Assert.Empty(workspace.
CurrentSolution
.Projects.Single().Documents);
402
var solution = workspace.
CurrentSolution
;
410
var snapshot = workspace.
CurrentSolution
;
421
var solution = workspace.
CurrentSolution
;
432
var snapshot = workspace.
CurrentSolution
;
445
var solution = workspace.
CurrentSolution
;
460
var snapshot = workspace.
CurrentSolution
;
478
var solutionX = workspace.
CurrentSolution
;
497
var solutionY = workspace.
CurrentSolution
;
515
var solutionZ = workspace.
CurrentSolution
;
536
var solutionX = workspace.
CurrentSolution
;
555
var solutionY = workspace.
CurrentSolution
;
579
var cs = workspace.
CurrentSolution
;
608
var solutionX = workspace.
CurrentSolution
;
627
var solutionY = workspace.
CurrentSolution
;
654
var cs = workspace.
CurrentSolution
;
676
var cs = workspace.
CurrentSolution
;
704
var solution = workspace.
CurrentSolution
;
715
solution = workspace.
CurrentSolution
;
740
Assert.Equal(startText, (await workspace.
CurrentSolution
.GetDocument(document.Id).GetTextAsync()).ToString());
743
var oldSolution = workspace.
CurrentSolution
;
747
Assert.Equal(startText, (await workspace.
CurrentSolution
.GetDocument(document.Id).GetTextAsync()).ToString());
771
var oldSolution = workspace.
CurrentSolution
;
777
Assert.Equal(2, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
792
var oldSolution = workspace.
CurrentSolution
;
798
Assert.Equal(0, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
1064
var project = workspace.
CurrentSolution
.Projects.Single();
1088
var project = workspace.
CurrentSolution
.Projects.Single();
1120
var project = workspace.
CurrentSolution
.Projects.Single();
1124
var oldSolution = workspace.
CurrentSolution
;
1133
var doc = workspace.
CurrentSolution
.GetAdditionalDocument(additionalDoc.Id);
1153
var project = workspace.
CurrentSolution
.Projects.Single();
1157
var oldSolution = workspace.
CurrentSolution
;
1166
var doc = workspace.
CurrentSolution
.GetAnalyzerConfigDocument(analyzerConfigDoc.Id);
1243
var project = workspace.
CurrentSolution
.Projects.Single();
1247
var oldSolution = workspace.
CurrentSolution
;
1250
var doc = workspace.
CurrentSolution
.GetAdditionalDocument(additionalDoc.Id);
1254
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
1255
Assert.Equal(2, workspace.
CurrentSolution
.GetProject(project1.Id).AdditionalDocuments.Count());
1259
oldSolution = workspace.
CurrentSolution
;
1264
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
1265
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).AdditionalDocuments.Count());
1266
Assert.Equal("original.config", workspace.
CurrentSolution
.GetProject(project1.Id).AdditionalDocuments.Single().Name);
1279
var project = workspace.
CurrentSolution
.Projects.Single();
1283
var oldSolution = workspace.
CurrentSolution
;
1286
var doc = workspace.
CurrentSolution
.GetAnalyzerConfigDocument(analyzerConfigDoc.Id);
1290
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
1291
Assert.Equal(2, workspace.
CurrentSolution
.GetProject(project1.Id).AnalyzerConfigDocuments.Count());
1295
oldSolution = workspace.
CurrentSolution
;
1300
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
1301
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).AnalyzerConfigDocuments.Count());
1302
Assert.Equal("original.config", workspace.
CurrentSolution
.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name);
1317
var project = workspace.
CurrentSolution
.Projects.Single();
1323
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
1324
Assert.Equal(2, workspace.
CurrentSolution
.GetProject(project1.Id).AdditionalDocuments.Count());
1327
project = workspace.
CurrentSolution
.Projects.Single();
1330
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
1331
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).AdditionalDocuments.Count());
1332
Assert.Equal("original.config", workspace.
CurrentSolution
.GetProject(project1.Id).AdditionalDocuments.Single().Name);
1345
var project = workspace.
CurrentSolution
.Projects.Single();
1351
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
1352
Assert.Equal(2, workspace.
CurrentSolution
.GetProject(project1.Id).AnalyzerConfigDocuments.Count());
1355
project = workspace.
CurrentSolution
.Projects.Single();
1358
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).Documents.Count());
1359
Assert.Equal(1, workspace.
CurrentSolution
.GetProject(project1.Id).AnalyzerConfigDocuments.Count());
1360
Assert.Equal("original.config", workspace.
CurrentSolution
.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name);
1375
var documentIdsWithFilePath = workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(docFilePath);
1379
documentIdsWithFilePath = workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(additionalDocFilePath);
1395
var documentIdsWithFilePath = workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(docFilePath);
1399
documentIdsWithFilePath = workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(analyzerConfigDocFilePath);
1474
var solution = workspace1.
CurrentSolution
;
1488
var currentOptionValue = workspace1.
CurrentSolution
.Options.GetOption(optionKey);
1511
var beforeSolutionForPrimaryWorkspace = primaryWorkspace.
CurrentSolution
;
1512
var beforeSolutionForSecondaryWorkspace = secondaryWorkspace.
CurrentSolution
;
1525
Assert.NotEqual(beforeSolutionForPrimaryWorkspace, primaryWorkspace.
CurrentSolution
);
1526
Assert.NotEqual(beforeSolutionForSecondaryWorkspace, secondaryWorkspace.
CurrentSolution
);
1538
Assert.NotSame(beforeSolutionForPrimaryWorkspace, primaryWorkspace.
CurrentSolution
);
1539
Assert.NotSame(beforeSolutionForSecondaryWorkspace, secondaryWorkspace.
CurrentSolution
);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
62
var solution = workspace.
CurrentSolution
;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (27)
Diagnostics\Suppression\SuppressionTests.cs (3)
447
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
757
var solution = workspace.
CurrentSolution
;
999
var solution = workspace.
CurrentSolution
;
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (14)
298
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
365
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
392
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source);
426
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
457
var oldSolution = workspace.
CurrentSolution
.
506
var oldSolution = workspace.
CurrentSolution
;
511
var newSolution = workspace.
CurrentSolution
.WithDocumentText(documentId, SourceText.From(source2));
537
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source);
575
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
614
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
655
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
702
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
736
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
792
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
SemanticSearch\CSharpSemanticSearchServiceTests.cs (5)
74
var solution = workspace.
CurrentSolution
;
278
var solution = workspace.
CurrentSolution
;
331
var solution = workspace.
CurrentSolution
;
396
var solution = workspace.
CurrentSolution
;
453
var solution = workspace.
CurrentSolution
;
Testing\CSharpTestMethodFinderTests.cs (5)
557
var testMethodFinder = workspace.
CurrentSolution
.Projects.Single().GetRequiredLanguageService<ITestMethodFinder>();
558
var testMethods = await testMethodFinder.GetPotentialTestMethodsAsync(workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id), span, CancellationToken.None);
571
var testMethodFinder = workspace.
CurrentSolution
.Projects.Single().GetRequiredLanguageService<ITestMethodFinder>();
572
var testMethods = await testMethodFinder.GetPotentialTestMethodsAsync(workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id), span, CancellationToken.None);
573
var semanticModel = await workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id).GetRequiredSemanticModelAsync(CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (3)
Formatting\FormattingMultipleSpanTests.cs (1)
164
var project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.CSharp);
OrganizeImports\OrganizeUsingsTests.cs (2)
29
var project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.CSharp);
90
var project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.CSharp);
Microsoft.CodeAnalysis.EditorFeatures (29)
CodeActions\CodeActionEditHandlerService.cs (5)
56
var oldSolution = workspace.
CurrentSolution
;
119
var oldSolution = workspace.
CurrentSolution
;
312
var openDocument = workspace.
CurrentSolution
.GetRequiredDocument(renameOperation.DocumentId);
346
var latestDocument = workspace.
CurrentSolution
.GetDocument(documentId);
359
var openDocument = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
EditorConfigSettings\Aggregator\SettingsAggregator.cs (2)
37
var currentSolution = _workspace.
CurrentSolution
.SolutionState;
95
UpdateProviders(_workspace.
CurrentSolution
.SolutionState);
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (1)
54
var solution = Workspace.
CurrentSolution
;
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (1)
74
var solution = Workspace.
CurrentSolution
;
InlineDiagnostics\InlineDiagnosticsTaggerProvider.cs (1)
64
var project = workspace.
CurrentSolution
.GetProject(diagnostic.DocumentId.ProjectId);
InlineRename\InlineRenameSession.cs (2)
968
var finalSolution = Workspace.
CurrentSolution
;
990
var finalChanges = Workspace.
CurrentSolution
.GetChanges(_baseSolution);
IntelliSense\NavigationActionFactory.cs (1)
60
var solution = workspace.
CurrentSolution
;
Interactive\InteractiveDocumentNavigationService.cs (1)
46
var document = interactiveWorkspace.
CurrentSolution
.GetDocument(documentId);
NavigateTo\NavigateToItemProvider.cs (3)
47
=> NavigateToUtilities.GetKindsProvided(_workspace.
CurrentSolution
);
53
foreach (var project in _workspace.
CurrentSolution
.Projects)
112
var solution = _workspace.
CurrentSolution
;
Navigation\IDocumentNavigationServiceExtensions.cs (1)
78
var document = workspace.
CurrentSolution
.GetTextDocument(documentId);
Peek\DefinitionPeekableItem.cs (1)
70
var solution = workspace.
CurrentSolution
;
Remote\SolutionChecksumUpdater.cs (2)
173
var solution = _workspace.
CurrentSolution
;
204
var solution = _workspace.
CurrentSolution
;
RenameTracking\RenameTrackingTaggerProvider.cs (1)
67
var document = workspace.
CurrentSolution
.GetDocument(documentId);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (1)
154
var finalSolution = workspace.
CurrentSolution
;
Shared\Extensions\WorkspaceExtensions.cs (2)
24
var oldSolution = workspace.
CurrentSolution
;
41
var oldSolution = workspace.
CurrentSolution
;
Shared\Preview\PreviewWorkspace.cs (4)
50
var document = this.
CurrentSolution
.GetTextDocument(documentId);
75
var document = this.
CurrentSolution
.GetRequiredDocument(documentId);
84
var document = this.
CurrentSolution
.GetRequiredAdditionalDocument(documentId);
93
var document = this.
CurrentSolution
.GetRequiredAnalyzerConfigDocument(documentId);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (49)
BraceMatching\AbstractBraceMatcherTests.cs (1)
27
var document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id);
BracePairs\AbstractBracePairsTests.cs (1)
30
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
CodeLens\AbstractCodeLensTest.cs (8)
25
var document = workspace.
CurrentSolution
.GetDocument(annotatedDocument.Id);
35
var result = await new CodeLensReferencesService().GetReferenceCountAsync(workspace.
CurrentSolution
, annotatedDocument.Id,
53
var document = workspace.
CurrentSolution
.GetDocument(annotatedDocument.Id);
62
var result = await new CodeLensReferencesService().FindReferenceLocationsAsync(workspace.
CurrentSolution
,
79
var document = workspace.
CurrentSolution
.GetDocument(annotatedDocument.Id);
88
var result = await new CodeLensReferencesService().FindReferenceMethodsAsync(workspace.
CurrentSolution
,
105
var document = workspace.
CurrentSolution
.GetDocument(annotatedDocument.Id);
114
var actual = await new CodeLensReferencesService().GetFullyQualifiedNameAsync(workspace.
CurrentSolution
,
Completion\AbstractCompletionProviderTests.cs (7)
371
var currentDocument = workspace.
CurrentSolution
.GetDocument(workspaceFixture.Target.CurrentDocument.Id);
700
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspaceFixture.Target.CurrentDocument.Id);
963
var solution = testWorkspace.
CurrentSolution
;
1019
var solution = testWorkspace.
CurrentSolution
;
1048
var solution = testWorkspace.
CurrentSolution
;
1283
var document = workspace.
CurrentSolution
.GetDocument(hostDocument.Id);
1328
var document = workspace.
CurrentSolution
.GetDocument(documentId);
Debugging\AbstractDataTipInfoGetterTests.cs (1)
71
workspace.
CurrentSolution
.Projects.First().Documents.First(),
Diagnostics\DiagnosticTaggerWrapper.cs (1)
37
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
Diagnostics\GenerateType\GenerateTypeTestState.cs (4)
37
TriggeredProject = Workspace.
CurrentSolution
.GetProject(_testDocument.Project.Id);
42
ProjectToBeModified = Workspace.
CurrentSolution
.GetProject(_testDocument.Project.Id);
46
ProjectToBeModified = Workspace.
CurrentSolution
.Projects.FirstOrDefault(proj => proj.Name.Equals(projectToBeModified));
50
InvocationDocument = Workspace.
CurrentSolution
.GetDocument(_testDocument.Id);
DocumentTracking\FirstDocumentIsActiveAndVisibleDocumentTrackingService.cs (1)
26
=> _workspace.
CurrentSolution
.Projects.First().DocumentIds.First();
ExtractInterface\ExtractInterfaceTestState.cs (3)
56
OriginalSolution = Workspace.
CurrentSolution
;
64
ExtractFromDocument = Workspace.
CurrentSolution
.GetDocument(_testDocument.Id);
122
return Workspace.
CurrentSolution
;
Formatting\AbstractNewDocumentFormattingServiceTests.cs (2)
28
var solution = workspace.
CurrentSolution
;
30
var document = workspace.
CurrentSolution
.Projects.First().Documents.First();
Formatting\CoreFormatterTestsBase.cs (1)
183
var document = workspace.
CurrentSolution
.GetDocument(hostdoc.Id);
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (2)
39
var document = workspace.
CurrentSolution
.GetDocument(hostDocument.Id);
63
var document = workspace.
CurrentSolution
.GetDocument(hostDocument.Id);
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
50
var document = workspace.
CurrentSolution
.GetDocument(testDocument.Id);
NavigateTo\AbstractNavigateToTests.cs (1)
242
=> [_workspace.
CurrentSolution
.Projects.First().DocumentIds.First()];
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (1)
27
var project = workspace.
CurrentSolution
.Projects.Single();
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
26
var project = workspace.
CurrentSolution
.Projects.Single();
Rename\RenamerTests.cs (3)
41
var solution = workspace.
CurrentSolution
;
176
var solution = workspace.
CurrentSolution
;
215
var solution = workspace.
CurrentSolution
;
SignatureHelp\AbstractSignatureHelpProviderTests.cs (3)
349
var document = testWorkspace.
CurrentSolution
.GetDocument(documentId);
352
document = testWorkspace.
CurrentSolution
.GetDocument(documentId);
468
var document = testWorkspace.
CurrentSolution
.GetDocument(documentId);
SpellCheck\AbstractSpellCheckSpanTests.cs (1)
28
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
Structure\AbstractSyntaxStructureProviderTests.cs (2)
50
var document = workspace.
CurrentSolution
.GetRequiredDocument(hostDocument.Id);
69
var document = workspace.
CurrentSolution
.GetRequiredDocument(hostDocument.Id);
TaskList\AbstractTaskListTests.cs (1)
38
var document = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
Workspaces\EditorTestHostDocument.cs (2)
160
foreach (var linkedId in workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(FilePath).Concat(this.Id))
170
var document = threadingContext.JoinableTaskFactory.Run(() => workspace.
CurrentSolution
.GetSourceGeneratedDocumentAsync(testDocument.Id, CancellationToken.None).AsTask());
Workspaces\TestWorkspaceFixture.cs (1)
93
return GetWorkspace().
CurrentSolution
.GetDocument(hostDocument.Id);
Microsoft.CodeAnalysis.EditorFeatures.Text (3)
Extensions.cs (3)
63
/// Gets the <see cref="Document"/>s from the corresponding <see cref="Workspace.
CurrentSolution
"/> that are associated with the <see cref="ITextSnapshot"/>'s buffer,
71
/// Gets the <see cref="Document"/> from the corresponding <see cref="Workspace.
CurrentSolution
"/> that is associated with the <see cref="ITextSnapshot"/>'s buffer
83
/// Gets the <see cref="Document"/>s from the corresponding <see cref="Workspace.
CurrentSolution
"/> that are associated with the <see cref="ITextBuffer"/>.
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (232)
CodeFixes\CodeFixServiceTests.cs (7)
50
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
57
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
294
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
357
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
381
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
764
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
1068
sourceDocument = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
CodeGeneration\AbstractCodeGenerationTests.cs (1)
31
var project = workspace.
CurrentSolution
CodeGeneration\CodeGenerationTests.cs (3)
883
this.Document = Workspace.
CurrentSolution
.Projects.Single().Documents.Single();
894
var semanticModel = await workspace.
CurrentSolution
.Projects.Single().Documents.Single().GetSemanticModelAsync();
899
public Solution Solution { get { return Workspace.
CurrentSolution
; } }
CodeRefactorings\CodeRefactoringServiceTest.cs (6)
49
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
88
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
107
var project = workspace.
CurrentSolution
.Projects.Single();
166
var project = workspace.
CurrentSolution
.Projects.Single()
205
var project = workspace.
CurrentSolution
.Projects.Single()
245
var project = workspace.
CurrentSolution
.Projects.Single()
Completion\CompletionServiceTests.cs (1)
43
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (24)
60
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
67
workspace.
CurrentSolution
.Projects.Single(), documentId: null, diagnosticIds: null, shouldIncludeAnalyzer: null,
82
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
96
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
111
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
131
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
150
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
235
var solution = workspace.
CurrentSolution
;
270
var project = workspace.
CurrentSolution
.Projects.Single();
281
var project = workspace.
CurrentSolution
.Projects.Single();
292
var project = workspace.
CurrentSolution
.Projects.Single();
317
var solution = workspace.
CurrentSolution
;
447
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
449
var project = workspace.
CurrentSolution
.Projects.Single();
559
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
561
var project = workspace.
CurrentSolution
.Projects.Single();
635
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
636
var project = workspace.
CurrentSolution
.Projects.Single();
674
var project = workspace.
CurrentSolution
.Projects.Single();
685
project = workspace.
CurrentSolution
.Projects.Single();
751
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
753
var project = workspace.
CurrentSolution
.Projects.Single();
794
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(new TestGeneratorReference(generator)).Solution));
796
var project = workspace.
CurrentSolution
.Projects.Single();
Diagnostics\DiagnosticDataTests.cs (5)
112
var document = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp).AddDocument("TestDocument", code);
139
var additionalDocument = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
175
var additionalDocument = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
223
var project = workspace.
CurrentSolution
.GetRequiredProject(documentId.ProjectId);
260
var firstDocument = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (2)
57
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences(
65
var document = workspace.
CurrentSolution
.GetDocument(documentId);
EditAndContinue\EditAndContinueLanguageServiceTests.cs (4)
71
solution = workspace.
CurrentSolution
;
119
await localWorkspace.ChangeSolutionAsync(localWorkspace.
CurrentSolution
123
var solution = localWorkspace.
CurrentSolution
;
262
solution = workspace.
CurrentSolution
;
FindSymbols\SymbolTreeInfoTests.cs (4)
21
var solution = workspace.
CurrentSolution
;
42
var solution = workspace.
CurrentSolution
;
65
var solution = workspace.
CurrentSolution
;
87
var solution = workspace.
CurrentSolution
;
Formatting\InferredIndentationTests.cs (3)
26
var options = await testWorkspace.
CurrentSolution
.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None);
39
var options = await testWorkspace.
CurrentSolution
.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None);
53
var options = await testWorkspace.
CurrentSolution
.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None);
InheritanceMargin\InheritanceMarginTests.cs (3)
97
var document = testWorkspace.
CurrentSolution
.GetRequiredDocument(testHostDocument.Id);
162
var docSpan = await actualDocumentSpans[i].TryRehydrateAsync(workspace.
CurrentSolution
, CancellationToken.None);
337
var document = testWorkspace.
CurrentSolution
.GetRequiredDocument(testHostDocument.Id);
LanguageServer\VSTypeScriptHandlerTests.cs (1)
135
var locations = await GetAnnotatedLocationsAsync(testWorkspace, testWorkspace.
CurrentSolution
);
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (5)
75
var solution = workspace.
CurrentSolution
;
78
var text = await workspace.
CurrentSolution
.GetRequiredDocument(documentId).GetTextAsync();
81
var linkedText = await workspace.
CurrentSolution
.GetRequiredDocument(linkedDocumentId).GetTextAsync();
91
Assert.Equal(s_expectedCode, (await workspace.
CurrentSolution
.GetRequiredDocument(documentId).GetTextAsync()).ToString());
92
Assert.Equal(s_expectedCode, (await workspace.
CurrentSolution
.GetRequiredDocument(linkedDocumentId).GetTextAsync()).ToString());
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (2)
77
get { return Workspace.
CurrentSolution
; }
315
var document = Workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id);
Preview\PreviewWorkspaceTests.cs (22)
31
Assert.NotNull(previewWorkspace.
CurrentSolution
);
39
Assert.NotNull(previewWorkspace.
CurrentSolution
);
46
using var previewWorkspace = new PreviewWorkspace(custom.
CurrentSolution
);
47
Assert.NotNull(previewWorkspace.
CurrentSolution
);
54
var solution = previewWorkspace.
CurrentSolution
;
58
var newSolution = previewWorkspace.
CurrentSolution
.RemoveProject(project.Id);
61
Assert.Equal(0, previewWorkspace.
CurrentSolution
.ProjectIds.Count);
68
var solution = previewWorkspace.
CurrentSolution
;
72
var addedSolution = previewWorkspace.
CurrentSolution
.Projects.First()
76
Assert.Equal(1, previewWorkspace.
CurrentSolution
.Projects.First().MetadataReferences.Count);
77
Assert.Equal(1, previewWorkspace.
CurrentSolution
.Projects.First().DocumentIds.Count);
80
var changedSolution = previewWorkspace.
CurrentSolution
.Projects.First().Documents.First().WithText(SourceText.From(text)).Project.Solution;
82
Assert.Equal(previewWorkspace.
CurrentSolution
.Projects.First().Documents.First().GetTextAsync().Result.ToString(), text);
84
var removedSolution = previewWorkspace.
CurrentSolution
.Projects.First()
85
.RemoveMetadataReference(previewWorkspace.
CurrentSolution
.Projects.First().MetadataReferences[0])
86
.RemoveDocument(previewWorkspace.
CurrentSolution
.Projects.First().DocumentIds[0]).Solution;
89
Assert.Equal(0, previewWorkspace.
CurrentSolution
.Projects.First().MetadataReferences.Count);
90
Assert.Equal(0, previewWorkspace.
CurrentSolution
.Projects.First().DocumentIds.Count);
97
var solution = previewWorkspace.
CurrentSolution
;
119
var storage = await persistentService.GetStorageAsync(SolutionKey.ToSolutionKey(previewWorkspace.
CurrentSolution
), CancellationToken.None);
129
Assert.NotNull(previewWorkspace.
CurrentSolution
);
166
var project = previewWorkspace.
CurrentSolution
.Projects.Single();
RenameTracking\RenameTrackingTestState.cs (2)
169
var document = this.Workspace.
CurrentSolution
.GetDocument(HostDocument.Id);
199
await operations[0].TryApplyAsync(this.Workspace, this.Workspace.
CurrentSolution
, CodeAnalysisProgress.None, CancellationToken.None);
Snippets\RoslynLSPSnippetConvertTests.cs (3)
402
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
413
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
495
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
StackTraceExplorer\StackTraceExplorerTests.cs (7)
40
var definition = await service.TryFindDefinitionAsync(workspace.
CurrentSolution
, stackFrame, StackFrameSymbolPart.Method, CancellationToken.None);
46
var doc = workspace.
CurrentSolution
.GetRequiredDocument(cursorDoc.Id);
55
var expectedDefinition = expectedSymbol.ToNonClassifiedDefinitionItem(workspace.
CurrentSolution
, includeHiddenLocations: true);
824
var definition = await service.TryFindDefinitionAsync(workspace.
CurrentSolution
, parsedFrame, StackFrameSymbolPart.Method, CancellationToken.None);
854
var definition = await service.TryFindDefinitionAsync(workspace.
CurrentSolution
, frame, StackFrameSymbolPart.Method, CancellationToken.None);
892
var (document, line) = service.GetDocumentAndLine(workspace.
CurrentSolution
, frame);
931
var (document, line) = service.GetDocumentAndLine(workspace.
CurrentSolution
, frame);
Structure\BlockStructureServiceTests.cs (1)
116
var document = workspace.
CurrentSolution
.GetDocument(hostDocument.Id);
Structure\StructureTaggerTests.cs (1)
402
var document = workspace.
CurrentSolution
.GetDocument(hostdoc.Id);
SymbolFinder\FindSymbolAtPositionTests.cs (1)
21
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.Single().Id);
SymbolFinder\SymbolFinderTests.cs (20)
58
var solution = workspace.
CurrentSolution
;
99
var solution = workspace.
CurrentSolution
;
146
var solution = workspace.
CurrentSolution
;
191
var solution = workspace.
CurrentSolution
;
232
var solution = workspace.
CurrentSolution
;
274
var solution = workspace.
CurrentSolution
;
316
var solution = workspace.
CurrentSolution
;
356
var solution = workspace.
CurrentSolution
;
397
var solution = workspace.
CurrentSolution
;
437
var solution = workspace.
CurrentSolution
;
468
var solution = workspace.
CurrentSolution
;
517
var solution = workspace.
CurrentSolution
;
569
var solution = workspace.
CurrentSolution
;
596
var solution = workspace.
CurrentSolution
;
643
var solution = workspace.
CurrentSolution
;
669
var solution = workspace.
CurrentSolution
;
733
var solution = workspace.
CurrentSolution
;
776
var solution = workspace.
CurrentSolution
;
804
var solution = workspace.
CurrentSolution
;
842
var solution = workspace.
CurrentSolution
;
SymbolKey\SymbolKeyCrossLanguageTests.cs (1)
40
var solution = workspace.
CurrentSolution
;
Tagging\AsynchronousTaggerTests.cs (2)
166
var document = workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id);
221
var document = workspace.
CurrentSolution
.GetRequiredDocument(testDocument.Id);
TextEditor\OpenDocumentTests.cs (5)
51
AssertEx.SetEqual(documentIds, workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(FilePath));
52
Assert.Equal(documentIds.Last(), workspace.
CurrentSolution
.GetDocument(documentIds.First()).GetLinkedDocumentIds().Single());
53
Assert.Equal(documentIds.First(), workspace.
CurrentSolution
.GetDocument(documentIds.Last()).GetLinkedDocumentIds().Single());
64
Assert.Same(workspace.
CurrentSolution
, newDocumentWithChanges.Project.Solution);
70
Assert.NotSame(workspace.
CurrentSolution
, originalDocumentWithChanges.Project.Solution);
TextEditor\TryGetDocumentTests.cs (2)
26
var document = workspace.
CurrentSolution
.GetDocument(workspace.GetDocumentId(hostDocument));
54
var document = workspace.
CurrentSolution
.GetDocument(workspace.GetDocumentId(hostDocument));
Utilities\SymbolEquivalenceComparerTests.cs (92)
51
var type = (ITypeSymbol)(await workspace.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
123
var csharpType = (ITypeSymbol)(await csharpWorkspace.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
124
var vbType = (await vbWorkspace.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
193
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
194
var type2_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single();
195
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
196
var type2_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single();
244
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
245
var type2_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single();
246
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
247
var type2_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single();
283
var typeC = (await workspace.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
284
var typeD = (await workspace.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("D").Single();
327
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
328
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
352
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
353
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
377
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
378
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
402
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
403
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
427
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
428
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
454
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
455
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
481
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
482
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
508
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
509
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
533
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
534
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
558
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
559
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
585
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
586
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
619
var csharpType1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
620
var vbType1 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
664
var csharpType1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
665
var vbType1 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
695
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
721
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
722
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
756
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
757
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
789
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
790
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
824
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
825
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
855
var outer1 = (INamespaceSymbol)(await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").Single();
856
var outer2 = (INamespaceSymbol)(await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").Single();
932
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
933
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
934
var type2_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single();
935
var type2_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single();
969
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
970
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single();
994
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
995
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
1019
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
1020
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
1050
var outer = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Outer").Single();
1051
var other = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Other").Single();
1080
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
1081
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single();
1111
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1112
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1151
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1152
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1181
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1182
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1211
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1212
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();
1273
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1274
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1305
var type1_v1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1306
var type1_v2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single();
1342
var t1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single();
1343
var t2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single();
1406
var t1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single();
1407
var t2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single();
1469
var t1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single();
1470
var t2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single();
1532
var t1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single();
1533
var t2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single();
1620
var comp1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync());
1621
var comp2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync());
1694
var comp1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync());
1695
var comp2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync());
1717
var namespace1 = (await workspace1.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetNamespaceMembers().Single(n => n.Name == "N").GetNamespaceMembers().Single(n => n.Name == "M");
1718
var namespace2 = (await workspace2.
CurrentSolution
.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetNamespaceMembers().Single(n => n.Name == "N").GetNamespaceMembers().Single(n => n.Name == "M");
ValueTracking\AbstractBaseValueTrackingTests.cs (2)
29
var document = testWorkspace.
CurrentSolution
.GetRequiredDocument(cursorDocument.Id);
39
return await service.TrackValueSourceAsync(testWorkspace.
CurrentSolution
, item, cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
148
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences(analyzeReferences))
Simplification\ParameterSimplificationTests.vb (1)
18
Dim solution = workspace.
CurrentSolution
Microsoft.CodeAnalysis.ExternalAccess.Copilot (2)
Internal\SemanticSearch\CopilotSemanticSearchQueryExecutor.cs (2)
82
_workspace.
CurrentSolution
.Services,
111
_workspace.
CurrentSolution
,
Microsoft.CodeAnalysis.ExternalAccess.FSharp (3)
LanguageServices\FSharpVisualStudioWorkspaceExtensions.cs (3)
24
var projects = workspace.
CurrentSolution
.Projects.Where(p => string.Equals(p.OutputFilePath, filePath, StringComparison.OrdinalIgnoreCase)).ToList();
44
return workspace.
CurrentSolution
.Projects.FirstOrDefault(p => p.FilePath == filePath)?.Id ?? ProjectId.CreateNewId("ProjectNotFound");
50
return workspace.
CurrentSolution
.GetProject(projectId)?.FilePath;
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Options\OmniSharpSolutionAnalyzerConfigOptionsUpdater.cs (1)
23
var oldSolution = workspace.
CurrentSolution
;
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
WorkspaceExtensions.cs (1)
24
return workspace.
CurrentSolution
.GetTextDocumentAsync(identifier, cancellationToken);
Microsoft.CodeAnalysis.Features (11)
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (2)
110
var newSolution = workspace.
CurrentSolution
.WithDocumentText(
122
var rolledBackSolution = workspace.
CurrentSolution
.WithDocumentText(
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
37
/// cref="Workspace.
CurrentSolution
"/> normally represents.
ExternalAccess\UnitTesting\UnitTestingStackTraceServiceAccessor.cs (2)
23
=> _stackTraceExplorerService.GetDocumentAndLine(workspace.
CurrentSolution
, parsedFrame.UnderlyingObject);
38
var definition = await _stackTraceExplorerService.TryFindDefinitionAsync(workspace.
CurrentSolution
, parsedFrame.UnderlyingObject, StackFrameSymbolPart.Method, cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
44
var (project, symbol) = await TryResolveSymbolAsync(workspace.
CurrentSolution
, symbolKey, cancellationToken).ConfigureAwait(false);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (3)
75
var metadataSolution = metadataWorkspace.
CurrentSolution
.WithFallbackAnalyzerOptions(sourceWorkspace.
CurrentSolution
.FallbackAnalyzerOptions);
344
var solution = fileInfo.Workspace.
CurrentSolution
;
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (2)
268
var pendingSolution = metadataWorkspace.
CurrentSolution
;
449
var solution = info.SourceWorkspace.
CurrentSolution
;
Microsoft.CodeAnalysis.Features.Test.Utilities (5)
EditAndContinue\EditAndContinueTestVerifier.cs (1)
465
var oldSolution = workspace.
CurrentSolution
;
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
76
solution = workspace.
CurrentSolution
;
RelatedDocuments\AbstractRelatedDocumentsTests.cs (1)
32
var startingDocument = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
Snippets\AbstractSnippetProviderTests.cs (2)
37
var project = workspace.
CurrentSolution
.
127
var project = workspace.
CurrentSolution
.
Microsoft.CodeAnalysis.Features.UnitTests (44)
EditAndContinue\ActiveStatementsMapTests.cs (3)
116
var solution = workspace.
CurrentSolution
171
var solution = workspace.
CurrentSolution
222
var solution = workspace.
CurrentSolution
EditAndContinue\CompileTimeSolutionProviderTests.cs (4)
41
var designTimeSolution = workspace.
CurrentSolution
.
123
_ = await workspace.
CurrentSolution
.GetRequiredProject(projectId).GetCompilationAsync();
126
var compileTimeSolution1 = provider.GetCompileTimeSolution(workspace.
CurrentSolution
);
141
var compileTimeSolution2 = provider.GetCompileTimeSolution(workspace.
CurrentSolution
);
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
70
var solution = workspace.
CurrentSolution
;
EditAndContinue\EmitSolutionUpdateResultsTests.cs (2)
30
solution = workspace.
CurrentSolution
;
75
var document = workspace.
CurrentSolution
.
EditAndContinue\RemoteEditAndContinueServiceTests.cs (5)
78
await localWorkspace.ChangeSolutionAsync(localWorkspace.
CurrentSolution
85
var solution = localWorkspace.
CurrentSolution
;
141
localWorkspace.
CurrentSolution
,
223
var results = await sessionProxy.EmitSolutionUpdateAsync(localWorkspace.
CurrentSolution
, runningProjects1, activeStatementSpanProvider, CancellationToken.None);
267
var baseActiveSpans = await sessionProxy.GetBaseActiveStatementSpansAsync(localWorkspace.
CurrentSolution
, [documentId, inProcOnlyDocumentId], CancellationToken.None);
FindUsages\DefinitionItemFactoryTests.cs (29)
130
var solution = workspace.
CurrentSolution
;
166
var solution = workspace.
CurrentSolution
;
208
var solution = workspace.
CurrentSolution
;
244
var solution = workspace.
CurrentSolution
;
286
var solution = workspace.
CurrentSolution
;
328
var solution = workspace.
CurrentSolution
;
381
var solution = workspace.
CurrentSolution
;
435
var solution = workspace.
CurrentSolution
;
475
var solution = workspace.
CurrentSolution
;
515
var solution = workspace.
CurrentSolution
;
557
var solution = workspace.
CurrentSolution
;
615
var solution = workspace.
CurrentSolution
;
661
var solution = workspace.
CurrentSolution
;
698
var solution = workspace.
CurrentSolution
;
760
var solution = workspace.
CurrentSolution
;
816
var solution = workspace.
CurrentSolution
;
870
var solution = workspace.
CurrentSolution
;
925
var solution = workspace.
CurrentSolution
;
975
var solution = workspace.
CurrentSolution
;
1030
var solution = workspace.
CurrentSolution
;
1082
var solution = workspace.
CurrentSolution
;
1144
var solution = workspace.
CurrentSolution
;
1201
var solution = workspace.
CurrentSolution
;
1258
var solution = workspace.
CurrentSolution
;
1330
var solution = workspace.
CurrentSolution
;
1390
var solution = workspace.
CurrentSolution
;
1442
var solution = workspace.
CurrentSolution
;
1505
var solution = workspace.
CurrentSolution
;
1576
var solution = workspace.
CurrentSolution
;
Microsoft.CodeAnalysis.LanguageServer (11)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (3)
80
return metadataWorkspace.
CurrentSolution
.GetRequiredDocument(documentId);
113
return workspace.
CurrentSolution
.GetRequiredAdditionalDocument(docId);
117
return workspace.
CurrentSolution
.GetRequiredDocument(id);
HostWorkspace\LanguageServerProjectSystem.cs (1)
52
_projectFileExtensionRegistry = new ProjectFileExtensionRegistry(workspace.
CurrentSolution
.Services, new DiagnosticReporter(workspace));
HostWorkspace\LanguageServerWorkspace.cs (7)
16
/// our <see cref="Workspace.
CurrentSolution
"/> to stay in sync with all the document changes.
72
if (
CurrentSolution
.ContainsDocument(documentId))
76
else if (
CurrentSolution
.ContainsAdditionalDocument(documentId))
89
if (
CurrentSolution
.ContainsDocument(documentId))
93
else if (
CurrentSolution
.ContainsAdditionalDocument(documentId))
106
var textDocument = w.
CurrentSolution
.GetDocument(documentId) ?? w.
CurrentSolution
.GetAdditionalDocument(documentId);
Microsoft.CodeAnalysis.LanguageServer.Protocol (10)
Workspaces\LspMiscellaneousFilesWorkspaceProvider.cs (7)
59
var document = metadataWorkspace.
CurrentSolution
.GetRequiredDocument(documentId);
80
return
CurrentSolution
.GetRequiredAdditionalDocument(docId);
84
return
CurrentSolution
.GetRequiredDocument(id);
101
var matchingDocument =
CurrentSolution
.GetDocumentIds(uri).SingleOrDefault();
104
if (
CurrentSolution
.ContainsDocument(matchingDocument))
108
else if (
CurrentSolution
.ContainsAdditionalDocument(matchingDocument))
115
var project =
CurrentSolution
.GetRequiredProject(matchingDocument.ProjectId);
Workspaces\LspWorkspaceManager.cs (3)
98
foreach (var documentId in workspace.
CurrentSolution
.GetDocumentIds(uri))
339
var workspaceCurrentSolution = workspace.
CurrentSolution
;
377
workspaceCurrentSolution = workspace.
CurrentSolution
;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (19)
Metadata\LspMetadataAsSourceWorkspaceTests.cs (1)
132
var doc = testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.
CurrentSolution
.Projects.SingleOrDefault()?.Documents.SingleOrDefault();
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
334
return testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.
CurrentSolution
.Projects.SingleOrDefault()?.Documents.SingleOrDefault();
339
return testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.
CurrentSolution
.Projects.SingleOrDefault()?.AdditionalDocuments.SingleOrDefault();
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (13)
49
Assert.Empty(workspace.
CurrentSolution
.FallbackAnalyzerOptions);
71
Assert.Empty(workspace.
CurrentSolution
.FallbackAnalyzerOptions);
78
Assert.False(workspace.
CurrentSolution
.FallbackAnalyzerOptions.TryGetValue(LanguageNames.CSharp, out _));
98
Assert.True(workspace.
CurrentSolution
.FallbackAnalyzerOptions.TryGetValue(language, out var fallbackOptions));
110
Assert.Empty(workspace.
CurrentSolution
.Projects);
147
Assert.False(workspace.
CurrentSolution
.FallbackAnalyzerOptions.TryGetValue(LanguageNames.CSharp, out _));
153
Assert.True(workspace.
CurrentSolution
.FallbackAnalyzerOptions.TryGetValue(LanguageNames.CSharp, out var fallbackOptions));
166
Assert.True(workspace.
CurrentSolution
.FallbackAnalyzerOptions.TryGetValue(LanguageNames.CSharp, out fallbackOptions));
171
var projectWithConfig = workspace.
CurrentSolution
.GetRequiredProject(testProjectWithConfig.Id);
210
var projectWithoutConfig = workspace.
CurrentSolution
.GetRequiredProject(testProjectWithoutConfig.Id);
277
Assert.Empty(workspace.
CurrentSolution
.FallbackAnalyzerOptions);
282
var optionsAfterProjectAdded = workspace.
CurrentSolution
.FallbackAnalyzerOptions;
289
Assert.Same(optionsAfterProjectAdded, workspace.
CurrentSolution
.FallbackAnalyzerOptions);
Workspaces\LspWorkspaceManagerTests.cs (3)
446
var newProjectWorkspaceTwo = testWorkspaceTwo.
CurrentSolution
.Projects.First().WithAssemblyName("NewCSProj1");
483
var documentUri = testWorkspace.
CurrentSolution
.Projects.First().Documents.First().GetURI();
502
var newProject = testWorkspace.
CurrentSolution
.Projects.First().WithAssemblyName(newAssemblyName);
Microsoft.CodeAnalysis.Remote.ServiceHub (8)
Host\RemoteWorkspace.cs (4)
51
var currentSolutionChecksum = await this.
CurrentSolution
.CompilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false);
211
var currentSolution = this.
CurrentSolution
;
238
/// cref="Workspace.
CurrentSolution
"/> of this <see cref="RemoteWorkspace"/> is the responsibility of any
246
/// fork off of <see cref="Workspace.
CurrentSolution
"/> if possible. The latter is almost always what will
Host\RemoteWorkspace.SolutionCreator.cs (1)
625
await TestUtils.AssertChecksumsAsync(_assetProvider, checksumFromRequest, workspace.
CurrentSolution
, incrementalSolutionBuilt, projectConeId).ConfigureAwait(false);
Host\RemoteWorkspace_SolutionCaching.cs (1)
128
solutions.Add(this.
CurrentSolution
);
Host\RemoteWorkspaceManager.cs (1)
30
/// cref="Workspace.
CurrentSolution
"/> of the workspace it is created against (as well as any recent in-flight
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (1)
122
var document = workspace.
CurrentSolution
.GetDocument(documentId);
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (6)
CaseCorrection\VisualBasicCaseCorrectionTestBase.vb (1)
16
Dim project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.VisualBasic)
Formatting\FormattingTests.vb (2)
3015
Dim project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.VisualBasic)
4197
Dim solution = New AdhocWorkspace().
CurrentSolution
Formatting\VisualBasicFormattingTestBase.vb (1)
58
Dim project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.VisualBasic)
OrganizeImports\OrganizeImportsTests.vb (2)
27
Dim project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.VisualBasic)
48
Dim project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.VisualBasic)
Microsoft.CodeAnalysis.Workspaces (76)
CodeActions\CodeAction.cs (1)
463
originalSolution ??= changedSolution.Workspace.
CurrentSolution
;
CodeActions\Operations\ApplyChangesOperation.cs (1)
53
var currentSolution = workspace.
CurrentSolution
;
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (2)
122
var solution = _workspace.
CurrentSolution
;
244
foreach (var projectId in service._workspace.
CurrentSolution
.ProjectIds)
Formatting\Formatter.cs (1)
322
return syntaxFormattingService.GetFormattingOptions(optionSet ?? workspace.
CurrentSolution
.Options);
Recommendations\Recommender.cs (1)
26
var solution = workspace.
CurrentSolution
;
Workspace\AdhocWorkspace.cs (9)
57
return this.
CurrentSolution
;
83
return this.
CurrentSolution
.GetProject(projectInfo.Id);
143
return this.
CurrentSolution
.GetDocument(documentInfo.Id);
151
var doc = this.
CurrentSolution
.GetDocument(documentId);
164
var doc = this.
CurrentSolution
.GetDocument(documentId);
179
var doc = this.
CurrentSolution
.GetAdditionalDocument(documentId);
192
var doc = this.
CurrentSolution
.GetAdditionalDocument(documentId);
207
var doc = this.
CurrentSolution
.GetAnalyzerConfigDocument(documentId);
220
var doc = this.
CurrentSolution
.GetAnalyzerConfigDocument(documentId);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (3)
286
if (_documentAlreadyInWorkspace(_project._projectSystemProjectFactory.Workspace.
CurrentSolution
, documentId))
338
if (_project._projectSystemProjectFactory.Workspace.
CurrentSolution
.GetDocument(documentId) != null)
484
var attributes = w.
CurrentSolution
.GetRequiredDocument(documentId).State.Attributes;
Workspace\ProjectSystem\ProjectSystemProject.cs (7)
290
TryReportCompilationThrownAway(_projectSystemProjectFactory.Workspace.
CurrentSolution
, Id);
520
private bool HasBeenRemoved => !_projectSystemProjectFactory.Workspace.
CurrentSolution
.ContainsProject(Id);
1365
return _projectSystemProjectFactory.Workspace.
CurrentSolution
.GetRequiredProject(Id).AllProjectReferences.Contains(projectReference);
1373
var projectReferencesInWorkspace = _projectSystemProjectFactory.Workspace.
CurrentSolution
.GetRequiredProject(Id).AllProjectReferences;
1412
if (!_projectSystemProjectFactory.Workspace.
CurrentSolution
.ContainsProject(Id))
1439
var project = w.
CurrentSolution
.GetRequiredProject(Id);
1447
if (w.
CurrentSolution
.ProjectIds.Count == 1)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (2)
154
analyzerReferences: w.
CurrentSolution
.AnalyzerReferences).WithTelemetryId(SolutionTelemetryId);
390
project = Workspace.
CurrentSolution
.GetRequiredProject(projectId);
Workspace\TextExtensions.cs (4)
26
var solution = workspace.
CurrentSolution
;
62
var solution = workspace.
CurrentSolution
;
109
var solution = workspace.
CurrentSolution
;
130
return workspace.
CurrentSolution
.GetDocument(id);
Workspace\Workspace.cs (42)
163
/// Sets the <see cref="
CurrentSolution
"/> of this workspace. This method does not raise a WorkspaceChange event.
173
/// Sets the <see cref="
CurrentSolution
"/> of this workspace. This method does not raise a
188
var oldSolution = this.
CurrentSolution
;
218
/// Applies specified transformation to <see cref="
CurrentSolution
"/>, updates <see cref="
CurrentSolution
"/> to
228
/// <returns>True if <see cref="
CurrentSolution
"/> was set to the transformed solution, false if the
406
/// Ensures that whenever a new language is added to <see cref="
CurrentSolution
"/> we
408
/// Conversely, if a language is no longer present in <see cref="
CurrentSolution
"/>
413
/// <see cref="
CurrentSolution
"/> as appropriate.
417
/// of any <see cref="Solution"/> snapshot stored in <see cref="
CurrentSolution
"/>.
455
/// Applies specified transformation to <see cref="
CurrentSolution
"/>, updates <see cref="
CurrentSolution
"/> to
466
/// <param name="onBeforeUpdate">Action to perform immediately prior to updating <see cref="
CurrentSolution
"/>.
467
/// The action will be passed the old <see cref="
CurrentSolution
"/> that will be replaced and the exact solution
471
/// <param name="onAfterUpdate">Action to perform once <see cref="
CurrentSolution
"/> has been updated. The
472
/// action will be passed the old <see cref="
CurrentSolution
"/> that was just replaced and the exact solution it
562
/// Setter also force updates the <see cref="
CurrentSolution
"/> to have the updated <see cref="Solution.Options"/>.
568
return this.
CurrentSolution
.Options;
1567
var oldSolution = this.
CurrentSolution
;
1621
if (this.
CurrentSolution
.Options != newSolution.Options)
1627
if (
CurrentSolution
.FallbackAnalyzerOptions != newSolution.FallbackAnalyzerOptions)
1632
if (!
CurrentSolution
.AnalyzerReferences.SequenceEqual(newSolution.AnalyzerReferences))
2116
var oldProject =
CurrentSolution
.GetRequiredProject(projectId);
2134
var oldProject =
CurrentSolution
.GetRequiredProject(projectId);
2348
=> CheckSolutionIsEmpty(this.
CurrentSolution
);
2362
=> CheckProjectIsInSolution(this.
CurrentSolution
, projectId);
2378
=> CheckProjectIsNotInSolution(this.
CurrentSolution
, projectId);
2395
if (!this.
CurrentSolution
.GetProject(fromProjectId)!.ProjectReferences.Contains(projectReference))
2408
if (this.
CurrentSolution
.GetProject(fromProjectId)!.ProjectReferences.Contains(projectReference))
2421
var transitiveReferences = this.
CurrentSolution
.GetProjectDependencyGraph().GetProjectsThatThisProjectTransitivelyDependsOn(toProjectId);
2435
if (!this.
CurrentSolution
.GetProject(projectId)!.MetadataReferences.Contains(metadataReference))
2446
if (this.
CurrentSolution
.GetProject(projectId)!.MetadataReferences.Contains(metadataReference))
2457
if (!this.
CurrentSolution
.GetProject(projectId)!.AnalyzerReferences.Contains(analyzerReference))
2468
if (this.
CurrentSolution
.GetProject(projectId)!.AnalyzerReferences.Contains(analyzerReference))
2500
=> CheckDocumentIsInSolution(this.
CurrentSolution
, documentId);
2516
=> CheckAdditionalDocumentIsInSolution(this.
CurrentSolution
, documentId);
2532
=> CheckAnalyzerConfigDocumentIsInSolution(this.
CurrentSolution
, documentId);
2549
if (this.
CurrentSolution
.ContainsDocument(documentId))
2561
=> CheckAdditionalDocumentIsNotInSolution(this.
CurrentSolution
, documentId);
2577
=> CheckAnalyzerConfigDocumentIsNotInSolution(this.
CurrentSolution
, documentId);
2594
var project = this.
CurrentSolution
.GetProject(projectId);
2604
var document = this.
CurrentSolution
.GetTextDocument(documentId);
Workspace\Workspace_Editor.cs (2)
212
/// Gets the ids for documents in the <see cref="
CurrentSolution
"/> snapshot associated with the given <paramref name="container"/>.
228
return
CurrentSolution
.GetRelatedDocumentIds(documentId);
Workspace\Workspace_Events.cs (1)
175
var currentSolution = this.
CurrentSolution
;
Microsoft.CodeAnalysis.Workspaces.MSBuild (12)
MSBuild\MSBuildWorkspace.cs (11)
213
return this.
CurrentSolution
;
252
var projectMap = ProjectMap.Create(this.
CurrentSolution
);
263
var projectResult = this.
CurrentSolution
.GetProject(projects[0].Id);
389
var document = this.
CurrentSolution
.GetDocument(documentId);
407
var document = this.
CurrentSolution
.GetAdditionalDocument(documentId);
455
var project = this.
CurrentSolution
.GetRequiredProject(info.Id.ProjectId);
515
var document = this.
CurrentSolution
.GetDocument(documentId);
599
var relativePath = PathUtilities.GetRelativePath(Path.GetDirectoryName(
CurrentSolution
.GetRequiredProject(projectId).FilePath)!, peRef.FilePath);
629
var project = this.
CurrentSolution
.GetProject(projectId);
654
var project = this.
CurrentSolution
.GetProject(projectReference.ProjectId);
669
var project = this.
CurrentSolution
.GetProject(projectReference.ProjectId);
MSBuild\ProjectMap.cs (1)
16
/// project into a custom <see cref="Workspace"/>. To use, pass <see cref="Workspace.
CurrentSolution
"/> to <see cref="Create(Solution)"/>.
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (48)
NetCoreTests.cs (20)
90
Assert.Single(workspace.
CurrentSolution
.ProjectIds);
136
Assert.Single(workspace.
CurrentSolution
.ProjectIds);
147
Assert.Equal(2, workspace.
CurrentSolution
.ProjectIds.Count);
154
Assert.Equal(libraryProject.FilePath, workspace.
CurrentSolution
.GetProject(projectRefId).FilePath);
176
Assert.Equal(2, workspace.
CurrentSolution
.ProjectIds.Count);
187
Assert.Equal(3, workspace.
CurrentSolution
.ProjectIds.Count);
219
Assert.Equal(3, workspace.
CurrentSolution
.ProjectIds.Count);
224
foreach (var project in workspace.
CurrentSolution
.Projects)
237
foreach (var project in workspace.
CurrentSolution
.Projects)
261
Assert.Equal(3, workspace.
CurrentSolution
.ProjectIds.Count);
265
foreach (var project in workspace.
CurrentSolution
.Projects)
309
Assert.Equal(4, workspace.
CurrentSolution
.ProjectIds.Count);
314
foreach (var project in workspace.
CurrentSolution
.Projects)
336
foreach (var project in workspace.
CurrentSolution
.Projects)
372
var projects = workspace.
CurrentSolution
.Projects.Where(p => p.FilePath.EndsWith("Project.csproj"));
377
var referencedProject = workspace.
CurrentSolution
.GetProject(projectReference.ProjectId);
466
Assert.Equal(2, workspace.
CurrentSolution
.ProjectIds.Count);
468
Assert.Contains(workspace.
CurrentSolution
.Projects, p => p.Name == "Library(net6)");
469
Assert.Contains(workspace.
CurrentSolution
.Projects, p => p.Name == "Library(net5)");
524
Assert.Equal(2, workspace.
CurrentSolution
.ProjectIds.Count);
VisualStudioMSBuildWorkspaceTests.cs (28)
1433
vbProject = workspace.
CurrentSolution
.GetProject(vbProject.Id);
2003
var solution2 = workspace.
CurrentSolution
;
2023
var projectB = workspaceB.
CurrentSolution
.GetProjectsByName("CSharpProject").FirstOrDefault();
2046
var solution2 = workspace.
CurrentSolution
;
2079
var solution2 = workspace.
CurrentSolution
;
2108
var solution2 = workspace.
CurrentSolution
;
2135
var solution2 = workspace.
CurrentSolution
;
2161
var solution2 = workspace.
CurrentSolution
;
2191
workspace.TryApplyChanges(workspace.
CurrentSolution
.AddAdditionalDocument(DocumentId.CreateNewId(csProjectId), "foo.xaml", SourceText.From("<foo></foo>")));
2194
var xaml = workspace.
CurrentSolution
.GetProject(csProjectId).AdditionalDocuments.FirstOrDefault(d => d.Name == "XamlFile.xaml");
2201
workspace.TryApplyChanges(workspace.
CurrentSolution
.RemoveAdditionalDocument(xaml.Id));
2214
var originalSolution = workspace.
CurrentSolution
;
2223
var doc = workspace.
CurrentSolution
.Projects.First().Documents.First();
2227
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithDocumentText(doc.Id, SourceText.From(newText), PreservationMode.PreserveIdentity));
2244
var originalSolution = workspace.
CurrentSolution
;
2253
var doc = workspace.
CurrentSolution
.Projects.First().Documents.First();
2259
.
CurrentSolution
2289
Assert.Equal(2, workspace.
CurrentSolution
.Projects.Count());
2319
Assert.Equal(2, workspace.
CurrentSolution
.Projects.Count());
2572
var csproject = workspace.
CurrentSolution
.Projects.First(p => p.Language == LanguageNames.CSharp);
2580
var vbproject = workspace.
CurrentSolution
.Projects.First(p => p.Language == LanguageNames.VisualBasic);
2931
workspace.TryApplyChanges(workspace.
CurrentSolution
.GetProject(project.Id).RemoveAnalyzerReference(aref).Solution);
2952
workspace.TryApplyChanges(workspace.
CurrentSolution
.GetProject(project.Id).RemoveProjectReference(pref).Solution);
2953
Assert.Empty(workspace.
CurrentSolution
.GetProject(project.Id).ProjectReferences);
2959
workspace.TryApplyChanges(workspace.
CurrentSolution
.GetProject(project.Id).AddProjectReference(pref).Solution);
2960
Assert.Single(workspace.
CurrentSolution
.GetProject(project.Id).ProjectReferences);
3276
Assert.Equal(0, workspace.
CurrentSolution
.ProjectIds.Count);
3304
Assert.Equal(0, workspace.
CurrentSolution
.ProjectIds.Count);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (11)
Formatting\FormattingTestBase.cs (1)
43
var project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", language);
WorkspaceExtensions.cs (3)
18
var oldSolution = workspace.
CurrentSolution
;
26
var oldSolution = workspace.
CurrentSolution
;
33
var oldSolution = workspace.
CurrentSolution
;
Workspaces\TestHostDocument.cs (1)
43
var project = workspace.
CurrentSolution
.GetRequiredProject(_project!.Id);
Workspaces\TestWorkspace`1.cs (6)
514
var document = await
CurrentSolution
.GetSourceGeneratedDocumentAsync(documentId, CancellationToken.None);
521
return ChangeDocumentAsync(documentId, this.
CurrentSolution
.WithDocumentText(documentId, text));
535
var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.
CurrentSolution
.AddDocument(documentInfo));
542
var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.
CurrentSolution
.WithAdditionalDocumentText(documentId, text));
549
var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.
CurrentSolution
.WithAnalyzerConfigDocumentText(documentId, text));
778
SerializerService.TestAccessor.AddAnalyzerImageReferences(this.
CurrentSolution
.AnalyzerReferences);
Microsoft.CodeAnalysis.Workspaces.UnitTests (349)
CodeCleanup\AddMissingTokensTests.cs (1)
2728
var solution = new AdhocWorkspace().
CurrentSolution
;
CodeCleanup\CodeCleanupTests.cs (1)
417
var solution = new AdhocWorkspace().
CurrentSolution
;
CodeCleanup\FixIncorrectTokenTests.cs (1)
753
var solution = new AdhocWorkspace().
CurrentSolution
;
CodeCleanup\NormalizeModifiersOrOperatorsTests.cs (1)
1029
var solution = new AdhocWorkspace().
CurrentSolution
;
CodeCleanup\ReduceTokenTests.cs (1)
2016
var solution = new AdhocWorkspace().
CurrentSolution
;
CodeCleanup\RemoveUnnecessaryLineContinuationTests.cs (1)
1452
var solution = new AdhocWorkspace().
CurrentSolution
;
CommandLineProject\CommandLineProjectWorkspaceTests.cs (2)
30
var project = ws.
CurrentSolution
.GetProject(info.Id);
58
var project = ws.
CurrentSolution
.GetProject(info.Id);
FindAllDeclarationsTests.cs (3)
133
var solution = workspace.
CurrentSolution
;
156
var solution = workspace.
CurrentSolution
;
699
var solution = workspace.
CurrentSolution
FindAllDeclarationsTests.TestSolutionsAndProject.cs (2)
94
solution = workspace.
CurrentSolution
109
solution = workspace.
CurrentSolution
;
FindReferencesTests.cs (8)
63
return workspace.
CurrentSolution
73
var solution = workspace.
CurrentSolution
122
var solution = workspace.
CurrentSolution
172
var sln = CreateWorkspace().
CurrentSolution
211
var sln = CreateWorkspace().
CurrentSolution
275
var sln = CreateWorkspace().
CurrentSolution
363
var solution = CreateWorkspace().
CurrentSolution
;
453
var solution = CreateWorkspace().
CurrentSolution
;
Formatter\FormatterTests.cs (3)
72
var solutionOptions = workspace.
CurrentSolution
.Options.
126
var updatedSolutionOptions = OptionsTestHelpers.GetOptionSetWithChangedOptions(workspace.
CurrentSolution
.Options, OptionsTestHelpers.PublicFormattingOptionsWithNonDefaultValues);
127
var solutionWithUpdatedOptions = workspace.
CurrentSolution
.WithOptions(updatedSolutionOptions);
GeneratedCodeRecognitionTests.cs (1)
101
return new AdhocWorkspace().
CurrentSolution
LinkedFileDiffMerging\LinkedFileDiffMergingTests.cs (1)
20
var solution = workspace.
CurrentSolution
;
SemanticModelReuse\SemanticModelReuseTests.cs (1)
25
var solution = new AdhocWorkspace().
CurrentSolution
;
Simplifier\SimplifierTests.cs (2)
81
var updatedOptions = GetOptionSetWithChangedPublicOptions(workspace.
CurrentSolution
.Options);
90
var solutionWithUpdatedOptions = workspace.
CurrentSolution
.WithOptions(updatedOptions);
SolutionTests\ProjectDependencyGraphTests.cs (1)
738
=> new AdhocWorkspace().
CurrentSolution
;
SolutionTests\ProjectSemanticVersionTests.cs (18)
22
var project = AddEmptyProject(workspace.
CurrentSolution
);
31
var project = AddEmptyProject(workspace.
CurrentSolution
)
41
var document = AddEmptyProject(workspace.
CurrentSolution
)
55
var document = AddEmptyProject(workspace.
CurrentSolution
)
69
var document = AddEmptyProject(workspace.
CurrentSolution
)
83
var document = AddEmptyProject(workspace.
CurrentSolution
)
97
var document = AddEmptyProject(workspace.
CurrentSolution
)
111
var document = AddEmptyProject(workspace.
CurrentSolution
)
125
var document = AddEmptyProject(workspace.
CurrentSolution
)
139
var document = AddEmptyProject(workspace.
CurrentSolution
)
153
var document = AddEmptyProject(workspace.
CurrentSolution
, LanguageNames.VisualBasic)
167
var document = AddEmptyProject(workspace.
CurrentSolution
, LanguageNames.VisualBasic)
181
var document = AddEmptyProject(workspace.
CurrentSolution
, LanguageNames.VisualBasic)
195
var document = AddEmptyProject(workspace.
CurrentSolution
, LanguageNames.VisualBasic)
209
var document = AddEmptyProject(workspace.
CurrentSolution
, LanguageNames.VisualBasic)
223
var document = AddEmptyProject(workspace.
CurrentSolution
, LanguageNames.VisualBasic)
237
var document = AddEmptyProject(workspace.
CurrentSolution
, LanguageNames.VisualBasic)
251
var document = AddEmptyProject(workspace.
CurrentSolution
, LanguageNames.VisualBasic)
SolutionTests\SolutionTests.cs (185)
56
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
78
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
115
var solution = workspace.
CurrentSolution
;
124
var solution = workspace.
CurrentSolution
;
134
var solution = workspace.
CurrentSolution
;
143
var solution = workspace.
CurrentSolution
;
153
var solution = workspace.
CurrentSolution
;
162
var solution = workspace.
CurrentSolution
;
172
var solution = workspace.
CurrentSolution
;
192
var solution = workspace.
CurrentSolution
;
223
var solution = workspace.
CurrentSolution
;
250
var solution = workspace.
CurrentSolution
;
269
var solution = workspace.
CurrentSolution
;
288
var solution = workspace.
CurrentSolution
;
299
var solution = workspace.
CurrentSolution
;
329
var solution = workspace.
CurrentSolution
345
var solution = workspace.
CurrentSolution
;
370
var solution = workspace.
CurrentSolution
;
394
var solution = workspace.
CurrentSolution
;
427
var solution = workspace.
CurrentSolution
;
474
solution = workspace.
CurrentSolution
;
515
var solution = workspace.
CurrentSolution
;
562
solution = workspace.
CurrentSolution
;
594
var solution = workspace.
CurrentSolution
;
648
solution = workspace.
CurrentSolution
;
680
var solution = workspace.
CurrentSolution
;
728
solution = workspace.
CurrentSolution
;
757
var solution = workspace.
CurrentSolution
;
804
solution = workspace.
CurrentSolution
;
839
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
845
var solution = workspace.
CurrentSolution
;
893
solution = workspace.
CurrentSolution
;
916
var solution = workspace.
CurrentSolution
;
938
var solution = workspace.
CurrentSolution
;
962
var solution = workspace.
CurrentSolution
;
984
var solution = workspace.
CurrentSolution
;
1008
var solution = workspace.
CurrentSolution
;
1030
var solution = workspace.
CurrentSolution
;
1052
var solution = workspace.
CurrentSolution
;
1088
var solution = workspace.
CurrentSolution
1297
var solution = workspace.
CurrentSolution
1332
var solution = workspace.
CurrentSolution
1367
var solution = workspace.
CurrentSolution
1402
var solution = workspace.
CurrentSolution
1436
var solution = workspace.
CurrentSolution
1458
var solution = workspace.
CurrentSolution
1486
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp);
1513
var solution = workspace.
CurrentSolution
1536
var solution = workspace.
CurrentSolution
1559
var solution = workspace.
CurrentSolution
.
1582
var solution = workspace.
CurrentSolution
.
1619
var solution = workspace.
CurrentSolution
1673
var solution = workspace.
CurrentSolution
1696
var solution = workspace.
CurrentSolution
1719
var solution = workspace.
CurrentSolution
1736
var solution = workspace.
CurrentSolution
1761
var solution = workspace.
CurrentSolution
1785
var document = workspace.
CurrentSolution
1819
var document = workspace.
CurrentSolution
1857
var document = workspace.
CurrentSolution
1876
var document = workspace.
CurrentSolution
1895
var document = workspace.
CurrentSolution
1911
var solution = workspace.
CurrentSolution
;
1944
var solution = workspace.
CurrentSolution
;
1960
var solution = workspace.
CurrentSolution
;
2002
var solution = workspace.
CurrentSolution
;
2037
var solution = workspace.
CurrentSolution
;
2073
var solution = workspace.
CurrentSolution
;
2091
var solution = workspace.
CurrentSolution
;
2116
var solution = workspace.
CurrentSolution
;
2143
var solution = workspace.
CurrentSolution
;
2161
var solution = workspace.
CurrentSolution
;
2189
var solution = workspace.
CurrentSolution
;
2216
var solution = workspace.
CurrentSolution
;
2230
var solution = workspace.
CurrentSolution
;
2256
var solution = workspace.
CurrentSolution
;
2283
var solution = workspace.
CurrentSolution
;
2302
TestOptionValues(workspace.
CurrentSolution
, expectedA: "A", hasBWithoutFallback: false, expectedB: "fallbackY", expectedBFile: "fallbackY");
2359
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp).
2385
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp).
2415
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp).
2442
var origSolution = workspace.
CurrentSolution
;
2467
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp).
2496
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp).
2530
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp).
2553
var solution = workspace.
CurrentSolution
;
2566
var solution = workspace.
CurrentSolution
;
2578
var solution = workspace.
CurrentSolution
;
2593
var solution = workspace.
CurrentSolution
2639
var solution = workspace.
CurrentSolution
2663
var solution = workspace.
CurrentSolution
2691
var solution = workspace.
CurrentSolution
2701
var solution = workspace.
CurrentSolution
;
2715
var solution = workspace.
CurrentSolution
2736
var solution = workspace.
CurrentSolution
2757
var solution = workspace.
CurrentSolution
2776
var solution = workspace.
CurrentSolution
2795
var solution = workspace.
CurrentSolution
2810
var solution = workspace.
CurrentSolution
2829
var solution = workspace.
CurrentSolution
2846
var solution = workspace.
CurrentSolution
2948
var solution = workspace.
CurrentSolution
;
2969
var solution = workspace.
CurrentSolution
;
3007
var solution = workspace.
CurrentSolution
;
3065
var solution = workspace.
CurrentSolution
;
3083
var sol = workspace.
CurrentSolution
;
3102
var sol = workspace.
CurrentSolution
;
3128
var sol = workspace.
CurrentSolution
;
3164
var sol = workspace.
CurrentSolution
3185
var solution1 = workspace.
CurrentSolution
3208
var sol = workspace.
CurrentSolution
3249
var sol = workspace.
CurrentSolution
3290
var solution = workspace.
CurrentSolution
3321
var sol = workspace.
CurrentSolution
;
3352
var sol = workspace.
CurrentSolution
3374
var sol = workspace.
CurrentSolution
3395
var sol = workspace.
CurrentSolution
3419
var sol = workspace.
CurrentSolution
3441
var sol = workspace.
CurrentSolution
3462
var sol = workspace.
CurrentSolution
3482
var sol = workspace.
CurrentSolution
3502
var sol = workspace.
CurrentSolution
3522
var sol = workspace.
CurrentSolution
3541
var sol = workspace.
CurrentSolution
3572
var sol = workspace.
CurrentSolution
3604
var sol = workspace.
CurrentSolution
3630
var sol = workspace.
CurrentSolution
3664
var sol = workspace.
CurrentSolution
3694
var sol = workspace.
CurrentSolution
3745
var sol = workspace.
CurrentSolution
3770
var sol = workspace.
CurrentSolution
3797
var sol = workspace.
CurrentSolution
3931
var solution = workspace.
CurrentSolution
;
3984
var solution = new AdhocWorkspace().
CurrentSolution
4110
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
4135
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
4163
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
4208
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
4290
var project = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4308
var project = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4324
var originalProject = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4348
var originalProject = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4376
var document = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4392
var solution = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp).Solution;
4448
var currentSolution = workspace.
CurrentSolution
;
4588
var solution = workspace.
CurrentSolution
;
4604
var solution = workspace.
CurrentSolution
;
4675
var solution = workspace.
CurrentSolution
;
4712
var solution = workspace.
CurrentSolution
;
4748
var solution = workspace.
CurrentSolution
;
4789
var solution = workspace.
CurrentSolution
;
4835
var solution = workspace.
CurrentSolution
;
4866
var solution = workspace.
CurrentSolution
;
4917
var solution = workspace.
CurrentSolution
;
4941
var solution = workspace.
CurrentSolution
4958
var solution = workspace.
CurrentSolution
;
4976
var solution = workspace.
CurrentSolution
;
4999
var solution = workspace.
CurrentSolution
;
5021
var solution = workspace.
CurrentSolution
;
5049
var solution = workspace.
CurrentSolution
;
5077
var solution = workspace.
CurrentSolution
;
5106
var solution = workspace.
CurrentSolution
;
5137
var solution = workspace.
CurrentSolution
;
5175
var solution = workspace.
CurrentSolution
;
5192
var solution = workspace.
CurrentSolution
;
5238
var solution = workspace.
CurrentSolution
;
5282
var solution = workspace.
CurrentSolution
;
5306
var solution = workspace.
CurrentSolution
;
5444
var s0 = workspace.
CurrentSolution
;
5490
var solution = workspace.
CurrentSolution
.AddProject(projInfo);
5519
var solution = workspace.
CurrentSolution
;
5573
var solution = workspace.
CurrentSolution
5601
var solution = workspace.
CurrentSolution
5621
var solution = workspace.
CurrentSolution
5635
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
5652
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
5672
var project1 = workspace.
CurrentSolution
.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp);
5700
var project1 = workspace.
CurrentSolution
.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp);
5730
var project1 = workspace.
CurrentSolution
.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp);
5763
var project1 = workspace.
CurrentSolution
.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp);
5788
var project1 = workspace.
CurrentSolution
5840
var project = workspace.
CurrentSolution
.AddProject("TypeScript", "TypeScript", "TypeScript");
5861
var project1 = workspace.
CurrentSolution
5894
var document1 = workspace.
CurrentSolution
.GetRequiredDocument(documentId1);
5900
var document2 = workspace.
CurrentSolution
.GetRequiredDocument(documentId2);
SolutionTests\SolutionWithSourceGeneratorTests.cs (50)
50
var project = AddEmptyProject(workspace.
CurrentSolution
)
91
var project = AddEmptyProject(workspace.
CurrentSolution
)
139
var project = AddEmptyProject(workspace.
CurrentSolution
)
166
var project = AddEmptyProject(workspace.
CurrentSolution
)
183
var project = AddEmptyProject(workspace.
CurrentSolution
)
255
var project = AddEmptyProject(workspace.
CurrentSolution
)
295
var project = AddEmptyProject(workspace.
CurrentSolution
)
339
var project = AddEmptyProject(workspace.
CurrentSolution
)
367
var projectBeforeChange = AddEmptyProject(workspace.
CurrentSolution
)
390
var solutionWithProjects = AddProjectWithReference(workspace.
CurrentSolution
, analyzerReference);
420
var solution = AddEmptyProject(workspace.
CurrentSolution
)
445
var project = AddEmptyProject(workspace.
CurrentSolution
)
459
var project = AddEmptyProject(workspace.
CurrentSolution
)
482
var project = AddEmptyProject(workspace.
CurrentSolution
)
502
var project = AddEmptyProject(workspace.
CurrentSolution
)
529
var project = AddEmptyProject(workspace.
CurrentSolution
)
577
var project = AddEmptyProject(workspace.
CurrentSolution
);
590
var project = AddEmptyProject(workspace.
CurrentSolution
)
602
Assert.NotSame(workspace.
CurrentSolution
, generatedDocument.Project.Solution);
614
var project = AddEmptyProject(workspace.
CurrentSolution
)
619
var generatedDocument = Assert.Single(await workspace.
CurrentSolution
.Projects.Single().GetSourceGeneratedDocumentsAsync());
625
Assert.Same(workspace.
CurrentSolution
, generatedDocument!.Project.Solution);
633
var originalAdditionalFile = AddEmptyProject(workspace.
CurrentSolution
)
646
Assert.Empty(await workspace.
CurrentSolution
.Projects.Single().GetSourceGeneratedDocumentsAsync());
661
var solution = AddEmptyProject(workspace.
CurrentSolution
)
670
var generatedDocument = Assert.Single(await workspace.
CurrentSolution
.GetRequiredProject(projectIdWithGenerator).GetSourceGeneratedDocumentsAsync());
692
var project = AddEmptyProject(workspace.
CurrentSolution
)
704
var document = await workspace.
CurrentSolution
.GetSourceGeneratedDocumentAsync(generatedDocument.Identity.DocumentId, CancellationToken.None);
720
var project = AddEmptyProject(workspace.
CurrentSolution
)
726
var documentToFreeze = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
751
var project = AddEmptyProject(workspace.
CurrentSolution
)
780
var project = AddEmptyProject(workspace.
CurrentSolution
)
810
var originalDocument1 = AddEmptyProject(workspace.
CurrentSolution
, name: "Project1")
848
var project = AddEmptyProject(workspace.
CurrentSolution
);
872
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
905
var solution = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference).Solution;
930
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
950
var project0 = AddEmptyProject(workspace.
CurrentSolution
);
986
var project = AddEmptyProject(workspace.
CurrentSolution
)
1018
var project = AddEmptyProject(workspace.
CurrentSolution
)
1048
var project = AddEmptyProject(workspace.
CurrentSolution
)
1088
var project = AddEmptyProject(workspace.
CurrentSolution
)
1116
var project = AddEmptyProject(workspace.
CurrentSolution
)
1143
var project = AddEmptyProject(workspace.
CurrentSolution
)
1171
var project = AddEmptyProject(workspace.
CurrentSolution
)
1204
var project = AddEmptyProject(workspace.
CurrentSolution
)
1259
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
1294
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
1331
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
1362
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
SolutionTests\SourceGeneratorTelemetryCollectorWorkspaceServiceTests.cs (1)
31
var project = AddEmptyProject(workspace.
CurrentSolution
)
SolutionTests\TryApplyChangesTests.cs (7)
77
var project = workspace.
CurrentSolution
.Projects.Single();
90
var project = workspace.
CurrentSolution
.Projects.Single();
103
var project = workspace.
CurrentSolution
.Projects.Single();
120
var project = workspace.
CurrentSolution
.Projects.Single();
135
var project = workspace.
CurrentSolution
.Projects.Single();
150
var project = workspace.
CurrentSolution
.Projects.Single();
164
var project = workspace.
CurrentSolution
.Projects.Single();
SymbolKeyTests.cs (2)
877
document = workspace.
CurrentSolution
.GetDocument(document.Id);
924
document = workspace.
CurrentSolution
.GetDocument(document.Id);
SyntaxNodeTests.cs (1)
87
var sol = new AdhocWorkspace().
CurrentSolution
SyntaxReferenceTests.cs (6)
49
var solution = AddSingleFileCSharpProject(workspace.
CurrentSolution
, @"
72
var solution = AddSingleFileVisualBasicProject(workspace.
CurrentSolution
, @"
94
var solution = AddSingleFileCSharpProject(workspace.
CurrentSolution
, @"
117
var solution = AddSingleFileVisualBasicProject(workspace.
CurrentSolution
, @"
140
var solution = AddSingleFileCSharpProject(workspace.
CurrentSolution
, @"
168
var solution = AddSingleFileVisualBasicProject(workspace.
CurrentSolution
, @"
WorkspaceServiceTests\GlobalOptionServiceTests.cs (15)
72
var newSolution1 = workspace1.
CurrentSolution
.WithOptions(newSet);
77
var oldSolution2 = workspace2.
CurrentSolution
;
83
var newSolution2 = workspace2.
CurrentSolution
;
103
var newSolution1 = workspace1.
CurrentSolution
.WithOptions(newSet);
107
var oldSolution2 = workspace2.
CurrentSolution
;
112
Assert.Equal("EOLN", workspace1.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
113
Assert.Equal("EOLN", workspace2.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
119
Assert.Equal("EOLN", workspace1.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
120
Assert.Equal("EOLN", workspace2.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
127
Assert.Equal("NEW_LINE", workspace1.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
128
Assert.Equal("NEW_LINE", workspace2.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
133
Assert.Equal("NEW_LINE", workspace1.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
134
Assert.Equal("NEW_LINE", workspace2.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
138
Assert.Equal("NEW_LINE2", workspace1.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
139
Assert.Equal("NEW_LINE2", workspace2.
CurrentSolution
.Options.GetOption<string>(perLanguageOptionKey));
WorkspaceTests\AdhocWorkspaceTests.cs (30)
37
Assert.Equal(project, ws.
CurrentSolution
.Projects.FirstOrDefault());
49
Assert.Same(project, ws.
CurrentSolution
.Projects.FirstOrDefault());
62
Assert.Equal(ws.
CurrentSolution
.GetDocument(info.Id), doc);
94
Assert.Same(ws.
CurrentSolution
, solution);
128
var solution = ws.
CurrentSolution
;
165
var newSolution = ws.
CurrentSolution
.AddProject(projInfo);
167
Assert.Equal(0, ws.
CurrentSolution
.Projects.Count());
172
Assert.Equal(1, ws.
CurrentSolution
.Projects.Count());
173
var proj = ws.
CurrentSolution
.Projects.First();
198
Assert.Equal(1, ws.
CurrentSolution
.Projects.Count());
200
var newSolution = ws.
CurrentSolution
.RemoveProject(pid);
206
Assert.Equal(0, ws.
CurrentSolution
.Projects.Count());
226
var doc = ws.
CurrentSolution
.GetDocument(docInfo.Id);
231
doc = ws.
CurrentSolution
.GetDocument(docInfo.Id);
239
doc = ws.
CurrentSolution
.GetDocument(docInfo.Id);
260
var doc = ws.
CurrentSolution
.GetAdditionalDocument(docInfo.Id);
265
doc = ws.
CurrentSolution
.GetAdditionalDocument(docInfo.Id);
273
doc = ws.
CurrentSolution
.GetAdditionalDocument(docInfo.Id);
299
var doc = ws.
CurrentSolution
.GetAnalyzerConfigDocument(docInfo.Id);
304
doc = ws.
CurrentSolution
.GetAnalyzerConfigDocument(docInfo.Id);
312
doc = ws.
CurrentSolution
.GetAnalyzerConfigDocument(docInfo.Id);
333
var doc = ws.
CurrentSolution
.GetDocument(docInfo.Id);
381
var pws = new WorkspaceWithPartialSemantics(ws.
CurrentSolution
);
382
var proj = pws.
CurrentSolution
.GetProject(projid);
390
var frozen = pws.
CurrentSolution
.GetDocument(docid1).WithFrozenPartialSemantics(CancellationToken.None);
434
var appliedDoc = ws.
CurrentSolution
.GetDocument(originalDoc.Id);
467
var appliedDoc = ws.
CurrentSolution
.GetDocument(originalDoc.Id);
501
var appliedDoc = ws.
CurrentSolution
.GetDocument(originalDoc.Id);
532
var appliedDoc = ws.
CurrentSolution
.GetDocument(originalDoc.Id);
562
var appliedDoc = ws.
CurrentSolution
.GetDocument(originalDoc.Id);
WorkspaceTests\WorkspaceTests.cs (4)
106
var newSolution = ws.
CurrentSolution
.WithAnalyzerReferences([new TestAnalyzerReference()]);
144
return this.
CurrentSolution
.GetProject(projectInfo.Id);
182
return this.
CurrentSolution
.GetDocument(documentInfo.Id);
190
var solution = workspace1.
CurrentSolution
;
Microsoft.VisualStudio.LanguageServices (104)
CallHierarchy\CallHierarchyDetail.cs (2)
31
_documentId = workspace.
CurrentSolution
.GetDocumentId(location.SourceTree);
69
var solution = _workspace.
CurrentSolution
;
CallHierarchy\Finders\AbstractCallFinder.cs (1)
94
var project = workspace.
CurrentSolution
.GetProject(_projectId);
CodeCleanup\AbstractCodeCleanUpFixer.cs (3)
57
var solution = _workspace.
CurrentSolution
;
92
var project = _workspace.
CurrentSolution
.GetProject(projectId);
117
var solution = _workspace.
CurrentSolution
;
CodeLens\CodeLensCallbackListener.cs (4)
69
var solution = _workspace.
CurrentSolution
;
89
var solution = _workspace.
CurrentSolution
;
121
var solution = _workspace.
CurrentSolution
;
160
var solution = _workspace.
CurrentSolution
;
DesignerAttribute\VisualStudioDesignerAttributeService.cs (1)
122
var solution = _workspace.
CurrentSolution
;
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (2)
76
var currentSolution = _workspace.
CurrentSolution
;
173
var solution = _workspace.
CurrentSolution
;
Diagnostics\VisualStudioVenusSpanMappingService.cs (1)
87
var solution = _workspace.
CurrentSolution
;
EditorConfigSettings\SettingsEditorControl.xaml.cs (1)
83
var solution = _workspace.
CurrentSolution
;
EditorConfigSettings\SettingsEditorFactory.cs (2)
64
if (!workspace.
CurrentSolution
.Projects.Any(p => p.Language is LanguageNames.CSharp or LanguageNames.VisualBasic))
71
if (!workspace.
CurrentSolution
.Projects.Any(p => p.AnalyzerConfigDocuments.Any(editorconfig => StringComparer.OrdinalIgnoreCase.Equals(editorconfig.FilePath, filePath))))
Extensions\VisualStudioWorkspaceImplExtensions.cs (1)
70
var document = workspace.
CurrentSolution
.GetDocument(id);
Implementation\AbstractEditorFactory.cs (1)
291
var solution = workspace.
CurrentSolution
;
Implementation\HierarchyItemToProjectIdMap.cs (1)
37
var candidateProjects = _workspace.
CurrentSolution
.Projects
Implementation\VisualStudioSupportsFeatureService.cs (1)
59
return SupportsRenameWorker(workspace.
CurrentSolution
.GetRelatedDocumentIds(documentId));
Implementation\VsRefactorNotifyService.cs (1)
176
var document = visualStudioWorkspace.
CurrentSolution
.GetDocument(documentId);
InheritanceMargin\MarginGlyph\InheritanceMarginContextMenu.xaml.cs (1)
68
var rehydrated = await viewModel.DefinitionItem.TryRehydrateAsync(_workspace.
CurrentSolution
, cancellationToken).ConfigureAwait(false);
Interactive\VsResetInteractive.cs (1)
165
=> _workspace.
CurrentSolution
.Projects.FirstOrDefault(proj => _workspace.GetHierarchy(proj.Id) == hierarchy);
LanguageService\AbstractCreateServicesOnTextViewConnection.cs (1)
90
else if (Workspace.
CurrentSolution
.GetProject(projectId) is Project project)
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (1)
193
var solution = _languageService.Workspace.
CurrentSolution
;
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (4)
189
=> this.Workspace.
CurrentSolution
.GetProject(projectId);
313
this.Workspace.
CurrentSolution
, _languageName, CancellationToken.None).ConfigureAwait(true);
324
return new ObjectList(ObjectListKind.Projects, flags, this, this.GetProjectListItems(this.Workspace.
CurrentSolution
, _languageName, flags));
485
var project = this.Workspace.
CurrentSolution
.GetProject(symbolListItem.ProjectId);
Library\ObjectBrowser\ObjectList.cs (3)
681
var project = this.LibraryManager.Workspace.
CurrentSolution
.GetProject(symbolListItem.ProjectId);
751
var project = this.LibraryManager.Workspace.
CurrentSolution
.GetProject(symbolItem.ProjectId);
909
var project = this.LibraryManager.Workspace.
CurrentSolution
.GetProject(projectListItem.ProjectId);
Library\ObjectBrowser\ObjectListItem.cs (1)
75
var project = workspace.
CurrentSolution
.GetProject(ProjectId);
NavigateTo\RoslynSearchItemsSource.cs (1)
95
var solution = provider._workspace.
CurrentSolution
;
Packaging\PackageInstallerServiceFactory.cs (1)
481
var solution = Workspace.
CurrentSolution
;
Progression\GraphNavigatorExtension.cs (1)
46
var solution = _workspace.
CurrentSolution
;
Progression\GraphQueryManager.cs (2)
60
var solution = _workspace.
CurrentSolution
;
101
var solution = _workspace.
CurrentSolution
;
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
98
foreach (var projectId in Workspace.
CurrentSolution
.ProjectIds)
ProjectSystem\VisualStudioWorkspace.cs (1)
48
=>
CurrentSolution
.GetTextDocument(documentId)?.FilePath;
ProjectSystem\VisualStudioWorkspaceImpl.AbstractAddDocumentUndoUnit.cs (1)
30
var currentSolution = Workspace.
CurrentSolution
;
ProjectSystem\VisualStudioWorkspaceImpl.AbstractRemoveDocumentUndoUnit.cs (2)
32
var currentSolution = Workspace.
CurrentSolution
;
45
var currentSolution = Workspace.
CurrentSolution
;
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
31
var currentSolution = Workspace.
CurrentSolution
;
ProjectSystem\VisualStudioWorkspaceImpl.AddProjectReferenceUndoUnit.cs (2)
28
var currentSolution = Workspace.
CurrentSolution
;
43
var currentSolution = Workspace.
CurrentSolution
;
ProjectSystem\VisualStudioWorkspaceImpl.cs (13)
304
var document = _threadingContext.JoinableTaskFactory.Run(() =>
CurrentSolution
.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask());
329
var currentSolution = this.
CurrentSolution
;
502
var originalProject =
CurrentSolution
.GetRequiredProject(projectId);
520
var parseOptionsService =
CurrentSolution
.GetRequiredProject(projectId).Services.GetRequiredService<IParseOptionsChangingService>();
923
if (
CurrentSolution
.FilePath is null || documentInfo.FilePath is null)
932
var solutionDirectory = PathUtilities.GetDirectoryName(this.
CurrentSolution
.FilePath);
938
if (PathUtilities.GetDirectoryName(
CurrentSolution
.GetProject(documentInfo.Id.ProjectId)?.FilePath) == solutionDirectory)
1016
var document = this.
CurrentSolution
.GetTextDocument(documentId);
1093
var document = this.
CurrentSolution
.GetTextDocument(documentId);
1204
document = this.
CurrentSolution
.GetRequiredTextDocument(documentId);
1277
var document =
CurrentSolution
.GetRequiredDocument(documentId);
1371
return
CurrentSolution
.GetRequiredProject(documentId.ProjectId).Language switch
1670
uiContext.IsActive = this.
CurrentSolution
.Projects.Any(p => p.Language == language);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (7)
165
if (workspace.
CurrentSolution
.ContainsDocument(documentId))
169
else if (workspace.
CurrentSolution
.ContainsAdditionalDocument(documentId))
175
Debug.Assert(workspace.
CurrentSolution
.ContainsAnalyzerConfigDocument(documentId));
208
var solution = _workspace.
CurrentSolution
;
275
var documentIds = _workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(moniker);
317
var documentIds = w.
CurrentSolution
.GetDocumentIdsWithFilePath(moniker);
327
var solution = w.
CurrentSolution
;
ProjectSystem\VisualStudioWorkspaceImpl.RemoveMetadataReferenceUndoUnit.cs (1)
30
var currentSolution = Workspace.
CurrentSolution
;
ProjectSystem\VisualStudioWorkspaceImpl.RemoveProjectReferenceUndoUnit.cs (2)
28
var currentSolution = Workspace.
CurrentSolution
;
43
var currentSolution = Workspace.
CurrentSolution
;
ProjectSystem\VisualStudioWorkspaceImpl.RenameDocumentUndoUnit.cs (2)
33
var documentId = _workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(_filePath).FirstOrDefault();
36
var updatedSolution = _workspace.
CurrentSolution
.WithDocumentName(documentId, _toName);
ProjectSystem\VisualStudioWorkspaceImpl_SourceGenerators.cs (1)
70
var documentIds = _workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(moniker);
StackTraceExplorer\StackFrameViewModel.cs (2)
210
(_cachedDocument, _cachedLineNumber) = _stackExplorerService.GetDocumentAndLine(_workspace.
CurrentSolution
, _frame);
221
_definitionCache[symbolPart] = await _stackExplorerService.TryFindDefinitionAsync(_workspace.
CurrentSolution
, _frame, symbolPart, cancellationToken).ConfigureAwait(false);
SyncNamespaces\SyncNamespacesCommandHandler.cs (5)
77
visible = _workspace.
CurrentSolution
.Projects
106
var projects = _workspace.
CurrentSolution
.Projects
118
var solution = _workspace.
CurrentSolution
;
144
if (_workspace.
CurrentSolution
.GetChanges(solution).GetProjectChanges().Any())
154
oldSolution: _workspace.
CurrentSolution
,
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (1)
224
foreach (var p in _workspace.
CurrentSolution
.Projects)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (6)
202
var originalSolution = _workspace.
CurrentSolution
;
219
var newSolution = _workspace.
CurrentSolution
;
311
if (newSolution == _workspace.
CurrentSolution
)
322
_workspace.
CurrentSolution
,
474
var project = _workspace.
CurrentSolution
.GetProject(projectId);
554
var project = _workspace.
CurrentSolution
.GetProject(projectId);
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
301
_stateDoNotAccessDirectly = new InProgressState(this, _workspace.
CurrentSolution
);
TaskList\ProjectExternalErrorReporter.cs (3)
86
var project = _workspace.
CurrentSolution
.GetProject(_projectId);
131
return _workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(filePath)
316
if (workspace.
CurrentSolution
.GetDocument(documentId) is Document document &&
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (1)
182
var solution = _workspace.
CurrentSolution
;
Utilities\IVsEditorAdaptersFactoryServiceExtensions.cs (1)
30
var document = workspace.
CurrentSolution
.GetDocument(contextDocumentId);
Venus\ContainedDocument.cs (4)
184
foreach (var document in _workspace.
CurrentSolution
.GetProject(_project.Id).Documents)
205
return hierarchy.TryGetItemId(_workspace.
CurrentSolution
.GetDocument(document.Id).FilePath);
242
var originalDocument = _workspace.
CurrentSolution
.GetDocument(this.Id);
763
var document = _workspace.
CurrentSolution
.GetDocument(this.Id);
Venus\ContainedLanguage.cs (1)
152
if (Workspace.
CurrentSolution
.ContainsDocument(ContainedDocument.Id))
Workspace\GlobalUndoServiceFactory.WorkspaceGlobalUndoTransaction.cs (1)
61
var solution = visualStudioWorkspace.
CurrentSolution
;
Workspace\SourceGeneratedFileManager.cs (1)
337
var project = this.Workspace.
CurrentSolution
.GetProject(_documentIdentity.DocumentId.ProjectId);
Workspace\VisualStudioDocumentNavigationService.cs (4)
60
var document = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
77
var document = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
191
var solution = workspace.
CurrentSolution
;
260
var document = workspace.
CurrentSolution
.GetTextDocument(documentId);
Microsoft.VisualStudio.LanguageServices.CSharp (4)
SemanticSearch\SemanticSearchDocumentNavigationService.cs (1)
31
Debug.Assert(documentId == SemanticSearchUtilities.GetQueryDocumentId(workspace.
CurrentSolution
));
SemanticSearch\SemanticSearchPresenterController.cs (1)
33
await executor.ExecuteAsync(query, queryDocument: null, workspace.
CurrentSolution
, queryCancellationSource.Token).ConfigureAwait(false);
SemanticSearch\SemanticSearchToolWindowImpl.cs (2)
387
var querySolution = _semanticSearchWorkspace.Value.
CurrentSolution
;
400
await executor.ExecuteAsync(query: null, queryDocument, workspace.
CurrentSolution
, cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (13)
CodeModel\AbstractFileCodeElementTests.cs (1)
51
=> GetWorkspace().
CurrentSolution
;
CodeModel\FileCodeModelTestHelpers.cs (1)
35
var project = workspace.
CurrentSolution
.Projects.Single();
DesignerAttribute\DesignerAttributeServiceTests.cs (1)
122
var document = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
DocumentOutline\DocumentOutlineTestsBase.cs (2)
99
workspace.
CurrentSolution
.WithAnalyzerReferences([new TestAnalyzerReferenceByLanguage(DiagnosticExtensions.GetCompilerDiagnosticAnalyzersMap())]));
112
var locations = await GetAnnotatedLocationsAsync(testWorkspace, testWorkspace.
CurrentSolution
);
EditorConfigSettings\Aggregator\SettingsAggregatorTests.cs (1)
28
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
EditorConfigSettings\DataProvider\DataProviderTests.cs (1)
29
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
F1Help\F1HelpTests.cs (1)
30
var actualText = await service.GetHelpTermAsync(workspace.
CurrentSolution
.Projects.First().Documents.First(), workspace.Documents.First().SelectedSpans.First(), CancellationToken.None);
Interactive\Commands\ResetInteractiveTests.cs (2)
51
var project = workspace.
CurrentSolution
.Projects.FirstOrDefault(p => p.AssemblyName == "ResetInteractiveTestsAssembly");
145
workspace.
CurrentSolution
.GetProject(p.ProjectId)));
PersistentStorage\AbstractPersistentStorageTests.cs (3)
844
var location = configuration.TryGetStorageLocation(SolutionKey.ToSolutionKey(workspace.
CurrentSolution
));
985
var solution = workspace.
CurrentSolution
;
999
return workspace.
CurrentSolution
;
Microsoft.VisualStudio.LanguageServices.LiveShare (10)
Client\RemoteLanguageServiceWorkspace.cs (10)
241
var docId =
CurrentSolution
.GetDocumentIdsWithFilePath(filePath).FirstOrDefault();
244
return
CurrentSolution
.GetDocument(docId);
279
var docId =
CurrentSolution
.GetDocumentIdsWithFilePath(filePath).FirstOrDefault();
282
return
CurrentSolution
.GetDocument(docId);
317
var project =
CurrentSolution
.Projects.FirstOrDefault(p => p.Name == projectName && p.Language == language);
331
project =
CurrentSolution
.GetRequiredProject(projectInfo.Id);
341
return
CurrentSolution
.GetRequiredDocument(docInfo.Id);
370
if (
CurrentSolution
.ContainsProject(id.ProjectId))
386
var doc =
CurrentSolution
.GetDocument(documentId);
476
var document =
CurrentSolution
.GetDocument(documentId);
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (10)
CallHierarchy\CallHierarchyTestState.vb (1)
125
Dim documents = Workspace.
CurrentSolution
.Projects.SelectMany(Function(p) p.Documents).Where(Function(d) documentNames.Contains(d.Name))
CodeModel\CodeModelTestHelpers.vb (2)
60
Dim project = workspace.
CurrentSolution
.Projects.Single()
137
Dim document = state.Workspace.
CurrentSolution
.GetDocument(cursorDocument.Id)
CodeModel\CodeModelTestState.vb (1)
92
Dim projectId = Workspace.
CurrentSolution
.ProjectIds.Single()
CodeModel\Mocks\MockVisualStudioWorkspace.vb (6)
39
SetCurrentSolutionEx(testWorkspace.
CurrentSolution
)
50
Assert.True(_workspace.TryApplyChanges(_workspace.
CurrentSolution
.WithDocumentText(documentId, newText)))
51
SetCurrentSolutionEx(_workspace.
CurrentSolution
)
56
SetCurrentSolutionEx(_workspace.
CurrentSolution
)
60
Assert.True(_workspace.TryApplyChanges(_workspace.
CurrentSolution
.RemoveDocument(documentId)))
61
SetCurrentSolutionEx(_workspace.
CurrentSolution
)
Microsoft.VisualStudio.LanguageServices.UnitTests (143)
ChangeSignature\AddParameterViewModelTests.vb (1)
301
Dim workspaceDoc = workspace.
CurrentSolution
.GetDocument(doc.Id)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
461
Dim workspaceDoc = workspace.
CurrentSolution
.GetDocument(doc.Id)
CodeModel\AbstractEventCollectorTests.vb (3)
104
Dim project = workspace.
CurrentSolution
.Projects.First()
108
Dim codeDocument = workspace.
CurrentSolution
.GetDocument(workspace.Documents(0).Id)
111
Dim changeDocument = workspace.
CurrentSolution
.GetDocument(workspace.Documents(1).Id)
CodeModel\CSharp\FileCodeModelTests.vb (1)
1022
Dim changeDocument = changedWorkspace.
CurrentSolution
.GetDocument(changedWorkspace.Documents(0).Id)
CodeModel\CSharp\SyntaxNodeKeyTests.vb (2)
231
Dim project = workspace.
CurrentSolution
.Projects.First()
238
Dim document = workspace.
CurrentSolution
.GetDocument(cursorDocument.Id)
CodeModel\VisualBasic\FileCodeModelTests.vb (2)
1020
Dim changeDocument = changedworkspace.
CurrentSolution
.GetDocument(changedworkspace.Documents.First(Function(d) d.Name.Equals("File1.vb")).Id)
1036
changeDocument = changedworkspace.
CurrentSolution
.GetDocument(changedworkspace.Documents.First(Function(d) d.Name.Equals("File2.vb")).Id)
CommonControls\MemberSelectionViewModelTests.vb (1)
177
Dim workspaceDoc = workspace.
CurrentSolution
.GetDocument(doc.Id)
CommonControls\NewTypeDestinationSelectionViewModelTests.vb (1)
230
Dim workspaceDoc = workspace.
CurrentSolution
.GetDocument(doc.Id)
DebuggerIntelliSense\TestState.vb (1)
40
Dim language = Workspace.
CurrentSolution
.Projects.First().Language
Debugging\VisualBasicBreakpointResolutionServiceTests.vb (1)
28
Dim document = workspace.
CurrentSolution
.Projects.First.Documents.First
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (10)
51
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences({analyzerReference}))
60
Dim project = workspace.
CurrentSolution
.Projects.First()
79
Dim project = workspace.
CurrentSolution
.Projects.First()
97
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences({analyzerReference}))
106
Dim project = workspace.
CurrentSolution
.Projects.First()
119
Dim project = workspace.
CurrentSolution
.Projects.First()
155
Dim project = workspace.
CurrentSolution
.Projects.First()
195
Dim project = workspace.
CurrentSolution
.Projects.First()
229
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences({analyzerReference}))
234
Dim project = workspace.
CurrentSolution
.Projects.First()
ExtractInterface\ExtractInterfaceViewModelTests.vb (1)
293
Dim workspaceDoc = workspace.
CurrentSolution
.GetDocument(doc.Id)
GenerateType\GenerateTypeViewModelTests.vb (1)
841
Dim document = workspace.
CurrentSolution
.GetDocument(testDoc.Id)
GoToDefinition\GoToDefinitionApiTests.vb (1)
21
Dim solution = workspace.
CurrentSolution
Help\HelpTests.vb (1)
21
Assert.Equal(expected, Await service.GetHelpTermAsync(workspace.
CurrentSolution
.Projects.First().Documents.First(), workspace.Documents.First().SelectedSpans.First(), CancellationToken.None))
InheritanceMargin\InheritanceMarginViewModelTests.vb (1)
81
Dim document = workspace.
CurrentSolution
.GetDocument(testDocument.Id)
MoveStaticMembers\MoveStaticMembersViewModelTest.vb (1)
29
Dim workspaceDoc = workspace.
CurrentSolution
.GetDocument(doc.Id)
Preview\PreviewChangesTests.vb (11)
39
Dim document = workspace.
CurrentSolution
.GetDocument(documentId)
50
workspace.
CurrentSolution
,
92
Dim document = workspace.
CurrentSolution
.GetDocument(docId)
110
workspace.
CurrentSolution
,
134
Dim document = workspace.
CurrentSolution
.GetDocument(documentId)
145
workspace.
CurrentSolution
,
187
Dim document = workspace.
CurrentSolution
.GetDocument(docId)
210
workspace.
CurrentSolution
,
270
Dim document1 = workspace.
CurrentSolution
.GetDocument(documentId1)
273
Dim document2 = workspace.
CurrentSolution
.GetDocument(documentId2)
290
workspace.
CurrentSolution
,
Progression\ProgressionTestState.vb (7)
29
Dim graphBuilder As New GraphBuilder(Workspace.
CurrentSolution
)
31
Assert.NotNull(graphBuilder.TryAddNodeForDocument(Workspace.
CurrentSolution
.GetDocument(documentId), CancellationToken.None))
37
Dim document = Workspace.
CurrentSolution
.GetDocument(hostDocument.Id)
44
Dim graphBuilder As New GraphBuilder(Workspace.
CurrentSolution
)
51
Dim graphBuilder = Await graphQuery.GetGraphAsync(Workspace.
CurrentSolution
, graphContext, CancellationToken.None)
79
Dim document = Workspace.
CurrentSolution
.GetDocument(hostDocument.Id)
84
Return Workspace.
CurrentSolution
ProjectSystemShim\VisualBasicCodeModelLifetimeTests.vb (2)
28
Dim originalDocumentId = environment.Workspace.
CurrentSolution
.Projects.Single().DocumentIds.Single()
38
Dim newDocumentId = environment.Workspace.
CurrentSolution
.Projects.Single().DocumentIds.Single()
ProjectSystemShim\VisualBasicCompilerOptionsTests.vb (10)
25
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
44
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
63
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
86
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
109
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
129
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
149
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
168
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
188
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
196
workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
ProjectSystemShim\VisualBasicProjectTests.vb (3)
20
Assert.Equal(environment.Workspace.
CurrentSolution
.Projects.Single().Name, "Test")
24
Assert.Equal(environment.Workspace.
CurrentSolution
.Projects.Single().Name, "Test2")
35
Assert.Single(environment.Workspace.
CurrentSolution
.Projects)
ProjectSystemShim\VisualBasicSpecialReferencesTests.vb (10)
22
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
41
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
60
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
77
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
84
workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
92
workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
107
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
122
Dim workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
128
workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
134
workspaceProject = environment.Workspace.
CurrentSolution
.Projects.Single()
ProjectSystemShim\VisualStudioProjectTests\AnalyzerReferenceTests.vb (16)
37
Assert.Single(environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences)
52
Dim analyzers = environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Single().GetAnalyzers(LanguageNames.CSharp)
72
Dim analyzers = environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Single().GetAnalyzers(LanguageNames.CSharp)
91
Dim analyzers = environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Single().GetAnalyzers(LanguageNames.CSharp)
126
Assert.Empty(environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences)
131
Assert.Empty(environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences)
146
}, environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
160
}, environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
170
}, environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
180
}, environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
206
AssertEx.Equal({path1, path2}, environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
229
Assert.Empty(environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences)
238
}, environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
270
Assert.Empty(environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences)
279
}, environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
308
}, environment.Workspace.
CurrentSolution
.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
ProjectSystemShim\VisualStudioProjectTests\DynamicFileTests.vb (4)
39
Dim dynamicSourceFile = environment.Workspace.
CurrentSolution
.Projects.Single().Documents.Single()
47
Assert.Empty(environment.Workspace.
CurrentSolution
.Projects.Single().Documents)
89
Assert.Empty(environment.Workspace.
CurrentSolution
.Projects.Single().Documents)
93
Assert.Empty(environment.Workspace.
CurrentSolution
.Projects.Single().Documents)
ProjectSystemShim\VisualStudioProjectTests\MetadataToProjectReferenceConversionTests.vb (10)
30
Dim getProject2 = Function() environment.Workspace.
CurrentSolution
.GetProject(project2.Id)
67
Dim getProject2 = Function() environment.Workspace.
CurrentSolution
.GetProject(project2.Id)
102
Dim getReferencingProject = Function() environment.Workspace.
CurrentSolution
.GetProject(referencingProject.Id)
138
Dim getReferencingProject = Function() environment.Workspace.
CurrentSolution
.GetProject(referencingProject.Id)
175
Dim getReferencingProject = Function() environment.Workspace.
CurrentSolution
.GetProject(referencingProject.Id)
203
Dim getReferencingProject = Function() environment.Workspace.
CurrentSolution
.GetProject(referencingProject.Id)
249
Dim getReferencingProject = Function() environment.Workspace.
CurrentSolution
.GetProject(referencingProject.Id)
264
Dim getReferencingProject = Function() environment.Workspace.
CurrentSolution
.GetProject(referencingProject.Id)
300
Dim getReferencingProject = Function() environment.Workspace.
CurrentSolution
.GetProject(referencingProject.Id)
369
Assert.Single(environment.Workspace.
CurrentSolution
.Projects.Single().MetadataReferences)
ProjectSystemShim\VisualStudioProjectTests\ProjectSystemProjectFactoryTests.vb (2)
25
Dim projectInSolution = environment.Workspace.
CurrentSolution
.GetProject(project1.Id)
33
Dim newProjectInSolution As Project = environment.Workspace.
CurrentSolution
.GetProject(project1.Id)
ProjectSystemShim\VisualStudioProjectTests\SolutionIdTests.vb (4)
19
Dim solutionId = environment.Workspace.
CurrentSolution
.Id
27
Assert.NotEqual(solutionId, environment.Workspace.
CurrentSolution
.Id)
36
Dim solutionId = environment.Workspace.
CurrentSolution
.Id
40
Assert.Equal(solutionId, environment.Workspace.
CurrentSolution
.Id)
ProjectSystemShim\VisualStudioProjectTests\WorkspaceChangedEventTests.vb (4)
31
Assert.Equal(environment.Workspace.
CurrentSolution
.Projects.Single().DocumentIds.Single(), change.DocumentId)
71
Assert.Equal(environment.Workspace.
CurrentSolution
.Projects.Single().AdditionalDocumentIds.Single(), change.DocumentId)
101
Dim startingSolution = environment.Workspace.
CurrentSolution
106
Assert.Same(startingSolution, environment.Workspace.
CurrentSolution
)
PullMemberUp\PullMemberUpViewModelTest.vb (1)
249
Dim workspaceDoc = workspace.
CurrentSolution
.GetDocument(doc.Id)
RQName\RQNameTests.vb (1)
245
Dim workspaceDoc = workspace.
CurrentSolution
.GetDocument(doc.Id)
Snippets\CSharpSnippetExpansionClientTests.vb (1)
381
Dim document = workspace.
CurrentSolution
.Projects.Single().Documents.Single()
Snippets\VisualBasicSnippetExpansionClientTests.vb (1)
402
Dim document = workspace.
CurrentSolution
.Projects.Single().Documents.Single()
SolutionExplorer\SourceGeneratorItemTests.vb (4)
90
Dim sourceGeneratedDocument = Assert.Single(Await workspace.
CurrentSolution
.GetProject(projectId).GetSourceGeneratedDocumentsAsync())
122
Dim expectedNames = Aggregate document In workspace.
CurrentSolution
.GetProject(projectId).AdditionalDocuments
159
workspace.OnAdditionalDocumentRemoved(workspace.
CurrentSolution
.GetProject(projectId).AdditionalDocumentIds.Single())
255
workspace.OnAdditionalDocumentTextChanged(workspace.
CurrentSolution
.Projects.Single().AdditionalDocumentIds.Single(),
Venus\AbstractContainedLanguageCodeSupportTests.vb (2)
40
Dim document = workspace.
CurrentSolution
.Projects.Single().Documents.Single()
58
Return workspace.
CurrentSolution
.Projects.Single().Documents.Single()
Venus\DocumentService_IntegrationTests.vb (11)
76
Dim startDocument = workspace.
CurrentSolution
.GetDocument(cursorDocument.Id)
85
Dim definitionText = Await workspace.
CurrentSolution
.GetDocument(definitionDocument.Id).GetTextAsync()
144
Dim startDocument = workspace.
CurrentSolution
.GetDocument(originalDocument.Id)
149
Dim results = Await codelensService.FindReferenceLocationsAsync(workspace.
CurrentSolution
, startDocument.Id, node, CancellationToken.None)
153
Dim definitionText = Await workspace.
CurrentSolution
.GetDocument(definitionDocument.Id).GetTextAsync()
186
Dim document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id)
204
Dim currentDocument = workspace.
CurrentSolution
.GetDocument(document.Id)
226
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences({analyzerReference}))
228
Dim document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id)
277
Dim mappedDocument = testWorkspace.
CurrentSolution
.GetDocument(mappedTestDocument.Id)
315
Dim mappedDocument = testWorkspace.
CurrentSolution
.GetDocument(mappedTestDocument.Id)
Venus\DocumentServiceTests.vb (7)
41
Dim spans = Await spanMapper.MapSpansAsync(workspace.
CurrentSolution
.GetDocument(subjectDocument.Id), {New TextSpan(position, length:=0)}, CancellationToken.None)
65
Dim spans = Await spanMapper.MapSpansAsync(workspace.
CurrentSolution
.GetDocument(subjectDocument.Id), {New TextSpan(position, length:=0), New TextSpan(start:=1, length:=0), New TextSpan(position + 1, length:=0)}, CancellationToken.None)
116
Dim document = Assert.IsType(Of SourceGeneratedDocument)(Await workspace.
CurrentSolution
.GetDocumentAsync(sourceGeneratedDocumentId, includeSourceGenerated:=True))
140
Dim result = Await excerptService.TryExcerptAsync(workspace.
CurrentSolution
.GetDocument(subjectDocument.Id), GetNamedSpan(subjectDocument), ExcerptMode.SingleLine, ClassificationOptions.Default, CancellationToken.None)
179
Dim result = Await excerptService.TryExcerptAsync(workspace.
CurrentSolution
.GetDocument(subjectDocument.Id), GetNamedSpan(subjectDocument), ExcerptMode.Tooltip, ClassificationOptions.Default, CancellationToken.None)
226
Dim result = Await excerptService.TryExcerptAsync(workspace.
CurrentSolution
.GetDocument(subjectDocument.Id), GetNamedSpan(subjectDocument), ExcerptMode.Tooltip, ClassificationOptions.Default, CancellationToken.None)
279
Dim result = Await excerptService.TryExcerptAsync(workspace.
CurrentSolution
.GetDocument(subjectDocument.Id), GetNamedSpan(subjectDocument), ExcerptMode.SingleLine, ClassificationOptions.Default, CancellationToken.None)
VsNavInfo\VsNavInfoTests.vb (2)
829
Dim document = workspace.
CurrentSolution
.GetDocument(hostDocument.Id)
867
Dim document = workspace.
CurrentSolution
.GetDocument(hostDocument.Id)
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
ProjectSystemShim\VisualBasicProject.vb (1)
201
Dim project = Workspace.
CurrentSolution
.GetProject(ProjectSystemProject.Id)
Venus\ContainedLanguageStaticEventBinding.vb (2)
75
targetDocument = visualStudioWorkspace.
CurrentSolution
.GetDocument(targetDocument.Id)
103
targetDocument = visualStudioWorkspace.
CurrentSolution
.GetDocument(targetDocument.Id)
Microsoft.VisualStudio.LanguageServices.Xaml (4)
Implementation\XamlProjectService.cs (4)
170
var documentId = _workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(filePath).Single(d => d.ProjectId == project.Id);
174
var document = _workspace.
CurrentSolution
.GetRequiredDocument(documentId);
204
var document = _workspace.
CurrentSolution
.GetDocument(documentId);
258
var documentId = _workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(newMoniker).Single(d => d.ProjectId == project.Id);
Roslyn.VisualStudio.DiagnosticsWindow (1)
Panels\WorkspacePanel.xaml.cs (1)
77
var solution = workspace.
CurrentSolution
;
Roslyn.VisualStudio.Next.UnitTests (150)
Remote\RemoteHostClientServiceFactoryTests.cs (1)
64
Assert.True(workspace.
CurrentSolution
.CompilationState.TryGetStateChecksums(out _));
Remote\SnapshotSerializationTests.cs (13)
70
return workspace.
CurrentSolution
;
84
var solution = workspace.
CurrentSolution
;
105
var solution = workspace.
CurrentSolution
;
116
var solution = workspace.
CurrentSolution
;
139
var project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.CSharp);
153
var document = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.CSharp).AddDocument("Document", SourceText.From(code));
172
var solution = workspace.
CurrentSolution
;
476
var project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.CSharp);
501
var project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", LanguageNames.CSharp);
520
var project = workspace.
CurrentSolution
.AddProject("Project", "Project.dll", NoCompilationConstants.LanguageName);
532
var document = CreateWorkspace().
CurrentSolution
.AddProject("empty", "empty", LanguageNames.CSharp).AddDocument("empty", SourceText.From(""));
548
var project = CreateWorkspace().
CurrentSolution
.AddProject("empty", "empty", LanguageNames.VisualBasic);
581
var solution = workspace.
CurrentSolution
Services\AssetProviderTests.cs (4)
75
var solution = workspace.
CurrentSolution
;
103
var solution = workspace.
CurrentSolution
;
128
var project = workspace.
CurrentSolution
.Projects.First();
158
var project = workspace.
CurrentSolution
.Projects.First();
Services\ServiceHubServicesTests.cs (75)
73
var solution = workspace.
CurrentSolution
;
95
var solution = workspace.
CurrentSolution
;
150
var solution = workspace.
CurrentSolution
;
201
var solution = workspace.
CurrentSolution
;
212
workspace.
CurrentSolution
,
213
workspace.
CurrentSolution
.Projects.Single().Documents.Single(),
237
var solution = workspace.
CurrentSolution
.AddProject("unknown", "unknown", NoCompilationConstants.LanguageName).Solution;
272
var solution = workspace.
CurrentSolution
;
317
var solution = workspace.
CurrentSolution
;
337
solution = workspace.
CurrentSolution
;
351
solution = workspace.
CurrentSolution
;
446
var project = localWorkspace.
CurrentSolution
469
await UpdatePrimaryWorkspace(client, localWorkspace.
CurrentSolution
);
471
var localProject = localWorkspace.
CurrentSolution
.Projects.Single();
750
var solution = workspace.
CurrentSolution
;
762
solution = workspace.
CurrentSolution
;
785
var project = workspace.
CurrentSolution
834
var solution = workspace.
CurrentSolution
;
846
solution = workspace.
CurrentSolution
;
889
var solution = workspace.
CurrentSolution
;
902
solution = workspace.
CurrentSolution
;
927
var project1 = workspace.
CurrentSolution
936
var project2 = workspace.
CurrentSolution
944
var initialSolution = workspace.
CurrentSolution
;
949
var currentSolution = workspace.
CurrentSolution
;
978
var project1 = workspace.
CurrentSolution
987
var project2 = workspace.
CurrentSolution
995
var initialSolution = workspace.
CurrentSolution
;
1000
var currentSolution = workspace.
CurrentSolution
;
1019
var project1 = workspace.
CurrentSolution
1028
var project2 = workspace.
CurrentSolution
1036
var initialSolution = workspace.
CurrentSolution
;
1043
var currentSolution = workspace.
CurrentSolution
;
1062
var project1 = workspace.
CurrentSolution
1071
var project2 = workspace.
CurrentSolution
1079
var initialSolution = workspace.
CurrentSolution
;
1085
var currentSolution = workspace.
CurrentSolution
;
1114
var project1 = workspace.
CurrentSolution
1123
var project2 = workspace.
CurrentSolution
1132
var initialSolution = workspace.
CurrentSolution
;
1138
var currentSolution = workspace.
CurrentSolution
;
1167
var project1 = workspace.
CurrentSolution
1176
var project2 = workspace.
CurrentSolution
1185
var initialSolution = workspace.
CurrentSolution
;
1191
var currentSolution = workspace.
CurrentSolution
;
1220
var project1 = workspace.
CurrentSolution
1229
var project2 = workspace.
CurrentSolution
1238
var initialSolution = workspace.
CurrentSolution
;
1246
var currentSolution = workspace.
CurrentSolution
;
1265
var project1 = workspace.
CurrentSolution
1274
var project2 = workspace.
CurrentSolution
1283
var initialSolution = workspace.
CurrentSolution
;
1291
var currentSolution = workspace.
CurrentSolution
;
1310
var project1 = workspace.
CurrentSolution
1319
var project2 = workspace.
CurrentSolution
1327
var initialSolution = workspace.
CurrentSolution
;
1334
var currentSolution = workspace.
CurrentSolution
;
1353
var project1 = workspace.
CurrentSolution
1362
var project2 = workspace.
CurrentSolution
1370
var initialSolution = workspace.
CurrentSolution
;
1377
var currentSolution = workspace.
CurrentSolution
;
1396
var project = workspace.
CurrentSolution
.Projects.Single();
1405
project = workspace.
CurrentSolution
.Projects.Single();
1437
var project = workspace.
CurrentSolution
.Projects.Single();
1448
Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.
CurrentSolution
.WithDocumentText(normalDocId, SourceText.From("// new text"))));
1454
project = workspace.
CurrentSolution
.Projects.Single();
1494
var remoteSolution = remoteWorkspace.
CurrentSolution
;
1530
solution = localWorkspace.
CurrentSolution
;
1533
var currentRemoteSolution = remoteWorkspace.
CurrentSolution
;
1559
var project1 = workspace.
CurrentSolution
1565
var noCompilationProject = workspace.
CurrentSolution
.AddProject("unknown", "unknown", NoCompilationConstants.LanguageName);
1568
var initialSolution = workspace.
CurrentSolution
;
1578
var finalSolution = workspace.
CurrentSolution
;
1606
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
1609
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (14)
79
workspace.
CurrentSolution
, "MessageName", "JsonMessage", CancellationToken.None);
102
workspace.
CurrentSolution
.Projects.Single().Documents.Single(), "MessageName", "JsonMessage", CancellationToken.None);
350
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
376
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
411
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
449
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
496
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
507
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
541
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
572
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
608
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
661
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
685
localWorkspace.
CurrentSolution
,
691
localWorkspace.
CurrentSolution
.Projects.Single().Documents.Single(),
Services\SolutionAssetCacheTests.cs (1)
74
var solution = workspace.
CurrentSolution
;
Services\SolutionServiceTests.cs (35)
50
var solution = workspace.
CurrentSolution
;
67
var solution = workspace.
CurrentSolution
;
90
var assetProvider = await GetAssetProviderAsync(workspace, remoteWorkspace, workspace.
CurrentSolution
);
92
var solutionChecksum = await workspace.
CurrentSolution
.CompilationState.GetChecksumAsync(CancellationToken.None);
119
var assetProvider = await GetAssetProviderAsync(workspace, remoteWorkspace, workspace.
CurrentSolution
);
121
var solutionChecksum = await workspace.
CurrentSolution
.CompilationState.GetChecksumAsync(CancellationToken.None);
142
var solution = workspace.
CurrentSolution
;
330
var projectId = workspace.
CurrentSolution
.ProjectIds.First();
361
var projectId = workspace.
CurrentSolution
.ProjectIds.First();
394
var projectId = workspace.
CurrentSolution
.ProjectIds.First();
428
var solution1 = workspace.
CurrentSolution
;
478
Assert.Equal(remoteSolution, remoteWorkspace.
CurrentSolution
);
488
var solution = workspace.
CurrentSolution
;
508
var solution = workspace.
CurrentSolution
547
var solution = workspace.
CurrentSolution
;
588
var solution = workspace.
CurrentSolution
;
629
var solution = workspace.
CurrentSolution
;
662
var solution = workspace.
CurrentSolution
;
703
var solution = workspace.
CurrentSolution
;
743
var solution = workspace.
CurrentSolution
;
783
var solution = workspace.
CurrentSolution
;
816
var solution = workspace.
CurrentSolution
;
871
var solution = workspace.
CurrentSolution
;
917
var solution = workspace.
CurrentSolution
;
940
var solution = workspace.
CurrentSolution
;
960
solution = workspace.
CurrentSolution
;
985
var solution = workspace.
CurrentSolution
;
1004
var solution = workspace.
CurrentSolution
;
1036
var solution = workspace.
CurrentSolution
;
1074
var solution = workspace.
CurrentSolution
;
1100
var solution = workspace.
CurrentSolution
;
1127
var solution = workspace.
CurrentSolution
;
1156
var solution = workspace.
CurrentSolution
;
1203
var solution = workspace.
CurrentSolution
;
1279
var solution = workspace.
CurrentSolution
;
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (7)
51
var project = workspace.
CurrentSolution
.Projects.First();
84
var project = workspace.
CurrentSolution
.Projects.First();
123
var task = Task.Run(() => AnalyzeAsync(workspace, workspace.
CurrentSolution
.ProjectIds.First(), analyzerType, isHostAnalyzer: false, source.Token));
159
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
164
var project = workspace.
CurrentSolution
.Projects.First();
204
var project = workspace.
CurrentSolution
.Projects.First().AddAnalyzerReference(analyzerReference);
231
var solution = workspace.
CurrentSolution
;
Test.Utilities (1)
CodeMetricsTestsBase.cs (1)
46
.
CurrentSolution