1504 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)
179
var updatedDocument = workspace.
CurrentSolution
.GetRequiredDocument(document.Id);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (224)
Classification\SemanticClassifierTests.cs (2)
37
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
3919
var document = workspace.
CurrentSolution
.GetRequiredDocument(workspace.Documents.First().Id);
Classification\SyntacticClassifierTests.cs (3)
24
var document = workspace.
CurrentSolution
.Projects.First().Documents.First();
6131
var document = workspace.
CurrentSolution
.Projects.First().Documents.First();
6161
var document = workspace.
CurrentSolution
.Projects.First().Documents.First();
Classification\TotalClassifierTests.cs (1)
35
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)
181
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 (16)
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;
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 (10)
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
,
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)
62
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 (22)
Diagnostics\Suppression\SuppressionTests.cs (3)
447
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
758
var solution = workspace.
CurrentSolution
;
1000
var solution = workspace.
CurrentSolution
;
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (14)
302
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
369
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
396
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source);
430
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
463
var oldSolution = workspace.
CurrentSolution
.
512
var oldSolution = workspace.
CurrentSolution
;
517
var newSolution = workspace.
CurrentSolution
.WithDocumentText(documentId, SourceText.From(source2));
543
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source);
581
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
620
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
661
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
708
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
742
var oldSolution = AddDefaultTestProject(workspace.
CurrentSolution
, source1);
798
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
;
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 (21)
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
;
IntelliSense\NavigationActionFactory.cs (1)
60
var solution = workspace.
CurrentSolution
;
Navigation\IDocumentNavigationServiceExtensions.cs (1)
78
var document = workspace.
CurrentSolution
.GetTextDocument(documentId);
Remote\SolutionChecksumUpdater.cs (2)
169
var solution = _workspace.
CurrentSolution
;
200
var solution = _workspace.
CurrentSolution
;
RenameTracking\RenameTrackingTaggerProvider.cs (1)
69
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)
40
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)
38
var document = workspace.
CurrentSolution
.GetDocument(hostDocument.Id);
62
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 (231)
CodeFixes\CodeFixServiceTests.cs (7)
49
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
56
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
293
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
356
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
385
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
769
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
1073
sourceDocument = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
CodeGeneration\AbstractCodeGenerationTests.cs (1)
31
var project = workspace.
CurrentSolution
CodeGeneration\CodeGenerationTests.cs (3)
879
this.Document = Workspace.
CurrentSolution
.Projects.Single().Documents.Single();
890
var semanticModel = await workspace.
CurrentSolution
.Projects.Single().Documents.Single().GetSemanticModelAsync();
895
public Solution Solution { get { return Workspace.
CurrentSolution
; } }
CodeRefactorings\CodeRefactoringServiceTest.cs (5)
48
var project = workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(reference);
87
var document = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
106
var project = workspace.
CurrentSolution
.Projects.Single();
165
var project = workspace.
CurrentSolution
.Projects.Single()
204
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]));
69
workspace.
CurrentSolution
.Projects.Single(), documentId: null, diagnosticIds: null, shouldIncludeAnalyzer: null,
84
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
98
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
113
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
133
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
152
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
240
var solution = workspace.
CurrentSolution
;
276
var project = workspace.
CurrentSolution
.Projects.Single();
287
var project = workspace.
CurrentSolution
.Projects.Single();
298
var project = workspace.
CurrentSolution
.Projects.Single();
323
var solution = workspace.
CurrentSolution
;
455
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
457
var project = workspace.
CurrentSolution
.Projects.Single();
567
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
569
var project = workspace.
CurrentSolution
.Projects.Single();
643
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
644
var project = workspace.
CurrentSolution
.Projects.Single();
682
var project = workspace.
CurrentSolution
.Projects.Single();
693
project = workspace.
CurrentSolution
.Projects.Single();
759
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences([analyzerReference]));
761
var project = workspace.
CurrentSolution
.Projects.Single();
802
Assert.True(workspace.TryApplyChanges(workspace.
CurrentSolution
.Projects.Single().AddAnalyzerReference(new TestGeneratorReference(generator)).Solution));
804
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)
70
solution = workspace.
CurrentSolution
;
119
await localWorkspace.ChangeSolutionAsync(localWorkspace.
CurrentSolution
124
var solution = localWorkspace.
CurrentSolution
;
260
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)
134
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)
170
var document = this.Workspace.
CurrentSolution
.GetDocument(HostDocument.Id);
200
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.EditorFeatures.Wpf (5)
InlineDiagnostics\InlineDiagnosticsTaggerProvider.cs (1)
67
var project = workspace.
CurrentSolution
.GetProject(diagnostic.DocumentId.ProjectId);
NavigateTo\NavigateToItemProvider.cs (3)
47
=> NavigateToUtilities.GetKindsProvided(_workspace.
CurrentSolution
);
53
foreach (var project in _workspace.
CurrentSolution
.Projects)
112
var solution = _workspace.
CurrentSolution
;
Peek\DefinitionPeekableItem.cs (1)
70
var solution = workspace.
CurrentSolution
;
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.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)
18
return workspace.
CurrentSolution
.GetTextDocumentAsync(identifier, cancellationToken);
Microsoft.CodeAnalysis.Features (8)
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 (2)
75
var metadataSolution = metadataWorkspace.CurrentSolution.WithFallbackAnalyzerOptions(sourceWorkspace.
CurrentSolution
.FallbackAnalyzerOptions);
344
var solution = fileInfo.Workspace.
CurrentSolution
;
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
76
solution = workspace.
CurrentSolution
;
RelatedDocuments\AbstractRelatedDocumentsTests.cs (1)
32
var startingDocument = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
Snippets\AbstractSnippetProviderTests.cs (2)
35
var project = workspace.
CurrentSolution
.
118
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)
28
solution = workspace.
CurrentSolution
;
68
var document = workspace.
CurrentSolution
.
EditAndContinue\RemoteEditAndContinueServiceTests.cs (5)
77
await localWorkspace.ChangeSolutionAsync(localWorkspace.
CurrentSolution
84
var solution = localWorkspace.
CurrentSolution
;
140
localWorkspace.
CurrentSolution
,
218
var results = await sessionProxy.EmitSolutionUpdateAsync(localWorkspace.
CurrentSolution
, runningProjects: [project.Id], activeStatementSpanProvider, CancellationToken.None);
262
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 (8)
HostWorkspace\LanguageServerProjectSystem.cs (1)
83
_projectFileExtensionRegistry = new ProjectFileExtensionRegistry(workspaceFactory.Workspace.
CurrentSolution
.Services, new DiagnosticReporter(workspaceFactory.Workspace));
HostWorkspace\LanguageServerWorkspace.cs (7)
14
/// our <see cref="Workspace.
CurrentSolution
"/> to stay in sync with all the document changes.
69
if (
CurrentSolution
.ContainsDocument(documentId))
73
else if (
CurrentSolution
.ContainsAdditionalDocument(documentId))
86
if (
CurrentSolution
.ContainsDocument(documentId))
90
else if (
CurrentSolution
.ContainsAdditionalDocument(documentId))
103
var textDocument = w.
CurrentSolution
.GetDocument(documentId) ?? w.
CurrentSolution
.GetAdditionalDocument(documentId);
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Workspaces\LspWorkspaceManager.cs (3)
147
foreach (var documentId in workspace.
CurrentSolution
.GetDocumentIds(uri))
355
var workspaceCurrentSolution = workspace.
CurrentSolution
;
393
workspaceCurrentSolution = workspace.
CurrentSolution
;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (19)
Metadata\LspMetadataAsSourceWorkspaceTests.cs (1)
131
var doc = testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.
CurrentSolution
.Projects.SingleOrDefault()?.Documents.SingleOrDefault();
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
337
return testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.
CurrentSolution
.Projects.SingleOrDefault()?.Documents.SingleOrDefault();
342
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)
445
var newProjectWorkspaceTwo = testWorkspaceTwo.
CurrentSolution
.Projects.First().WithAssemblyName("NewCSProj1");
482
var documentUri = testWorkspace.
CurrentSolution
.Projects.First().Documents.First().GetURI();
501
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)
57
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 (42)
CodeActions\CodeAction.cs (1)
463
originalSolution ??= changedSolution.Workspace.
CurrentSolution
;
CodeActions\Operations\ApplyChangesOperation.cs (1)
53
var currentSolution = workspace.
CurrentSolution
;
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (1)
122
var solution = _workspace.
CurrentSolution
;
Formatting\Formatter.cs (1)
321
return syntaxFormattingService.GetFormattingOptions(optionSet ?? workspace.
CurrentSolution
.Options);
Recommendations\Recommender.cs (1)
26
var solution = workspace.
CurrentSolution
;
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);
1357
return _projectSystemProjectFactory.Workspace.
CurrentSolution
.GetRequiredProject(Id).AllProjectReferences.Contains(projectReference);
1365
var projectReferencesInWorkspace = _projectSystemProjectFactory.Workspace.
CurrentSolution
.GetRequiredProject(Id).AllProjectReferences;
1404
if (!_projectSystemProjectFactory.Workspace.
CurrentSolution
.ContainsProject(Id))
1431
var project = w.
CurrentSolution
.GetRequiredProject(Id);
1439
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 (18)
162
/// Sets the <see cref="
CurrentSolution
"/> of this workspace. This method does not raise a <see cref="WorkspaceChanged"/> event.
172
/// Sets the <see cref="
CurrentSolution
"/> of this workspace. This method does not raise a <see
187
var oldSolution = this.
CurrentSolution
;
217
/// Applies specified transformation to <see cref="
CurrentSolution
"/>, updates <see cref="
CurrentSolution
"/> to
227
/// <returns>True if <see cref="
CurrentSolution
"/> was set to the transformed solution, false if the
402
/// Ensures that whenever a new language is added to <see cref="
CurrentSolution
"/> we
404
/// Conversely, if a language is no longer present in <see cref="
CurrentSolution
"/>
409
/// <see cref="
CurrentSolution
"/> as appropriate.
413
/// of any <see cref="Solution"/> snapshot stored in <see cref="
CurrentSolution
"/>.
451
/// Applies specified transformation to <see cref="
CurrentSolution
"/>, updates <see cref="
CurrentSolution
"/> to
462
/// <param name="onBeforeUpdate">Action to perform immediately prior to updating <see cref="
CurrentSolution
"/>.
463
/// The action will be passed the old <see cref="
CurrentSolution
"/> that will be replaced and the exact solution
467
/// <param name="onAfterUpdate">Action to perform once <see cref="
CurrentSolution
"/> has been updated. The
468
/// action will be passed the old <see cref="
CurrentSolution
"/> that was just replaced and the exact solution it
558
/// Setter also force updates the <see cref="
CurrentSolution
"/> to have the updated <see cref="Solution.Options"/>.
564
return this.
CurrentSolution
.Options;
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)
270
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 (47)
NetCoreTests.cs (20)
88
Assert.Single(workspace.
CurrentSolution
.ProjectIds);
113
Assert.Single(workspace.
CurrentSolution
.ProjectIds);
124
Assert.Equal(2, workspace.
CurrentSolution
.ProjectIds.Count);
131
Assert.Equal(libraryProject.FilePath, workspace.
CurrentSolution
.GetProject(projectRefId).FilePath);
153
Assert.Equal(2, workspace.
CurrentSolution
.ProjectIds.Count);
164
Assert.Equal(3, workspace.
CurrentSolution
.ProjectIds.Count);
196
Assert.Equal(3, workspace.
CurrentSolution
.ProjectIds.Count);
201
foreach (var project in workspace.
CurrentSolution
.Projects)
214
foreach (var project in workspace.
CurrentSolution
.Projects)
238
Assert.Equal(3, workspace.
CurrentSolution
.ProjectIds.Count);
242
foreach (var project in workspace.
CurrentSolution
.Projects)
286
Assert.Equal(4, workspace.
CurrentSolution
.ProjectIds.Count);
291
foreach (var project in workspace.
CurrentSolution
.Projects)
313
foreach (var project in workspace.
CurrentSolution
.Projects)
349
var projects = workspace.
CurrentSolution
.Projects.Where(p => p.FilePath.EndsWith("Project.csproj"));
354
var referencedProject = workspace.
CurrentSolution
.GetProject(projectReference.ProjectId);
443
Assert.Equal(2, workspace.
CurrentSolution
.ProjectIds.Count);
445
Assert.Contains(workspace.
CurrentSolution
.Projects, p => p.Name == "Library(net6)");
446
Assert.Contains(workspace.
CurrentSolution
.Projects, p => p.Name == "Library(net5)");
501
Assert.Equal(2, workspace.
CurrentSolution
.ProjectIds.Count);
VisualStudioMSBuildWorkspaceTests.cs (27)
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);
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)
42
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 (343)
CodeCleanup\AddMissingTokensTests.cs (1)
2728
var solution = new AdhocWorkspace().
CurrentSolution
;
CodeCleanup\CodeCleanupTests.cs (1)
416
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 (181)
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).
2444
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp).
2473
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp).
2504
var solution = workspace.
CurrentSolution
.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp).
2527
var solution = workspace.
CurrentSolution
;
2540
var solution = workspace.
CurrentSolution
;
2552
var solution = workspace.
CurrentSolution
;
2567
var solution = workspace.
CurrentSolution
2613
var solution = workspace.
CurrentSolution
2637
var solution = workspace.
CurrentSolution
2665
var solution = workspace.
CurrentSolution
2675
var solution = workspace.
CurrentSolution
;
2689
var solution = workspace.
CurrentSolution
2710
var solution = workspace.
CurrentSolution
2731
var solution = workspace.
CurrentSolution
2750
var solution = workspace.
CurrentSolution
2769
var solution = workspace.
CurrentSolution
2784
var solution = workspace.
CurrentSolution
2803
var solution = workspace.
CurrentSolution
2820
var solution = workspace.
CurrentSolution
2923
var solution = workspace.
CurrentSolution
;
2944
var solution = workspace.
CurrentSolution
;
2982
var solution = workspace.
CurrentSolution
;
3040
var solution = workspace.
CurrentSolution
;
3058
var sol = workspace.
CurrentSolution
;
3077
var sol = workspace.
CurrentSolution
;
3103
var sol = workspace.
CurrentSolution
;
3139
var sol = workspace.
CurrentSolution
3160
var solution1 = workspace.
CurrentSolution
3183
var sol = workspace.
CurrentSolution
3224
var sol = workspace.
CurrentSolution
3265
var solution = workspace.
CurrentSolution
3296
var sol = workspace.
CurrentSolution
;
3327
var sol = workspace.
CurrentSolution
3349
var sol = workspace.
CurrentSolution
3370
var sol = workspace.
CurrentSolution
3394
var sol = workspace.
CurrentSolution
3416
var sol = workspace.
CurrentSolution
3437
var sol = workspace.
CurrentSolution
3457
var sol = workspace.
CurrentSolution
3477
var sol = workspace.
CurrentSolution
3497
var sol = workspace.
CurrentSolution
3516
var sol = workspace.
CurrentSolution
3547
var sol = workspace.
CurrentSolution
3579
var sol = workspace.
CurrentSolution
3605
var sol = workspace.
CurrentSolution
3639
var sol = workspace.
CurrentSolution
3669
var sol = workspace.
CurrentSolution
3720
var sol = workspace.
CurrentSolution
3745
var sol = workspace.
CurrentSolution
3772
var sol = workspace.
CurrentSolution
3906
var solution = workspace.
CurrentSolution
;
3959
var solution = new AdhocWorkspace().
CurrentSolution
4085
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
4110
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
4138
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
4183
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
4265
var project = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4283
var project = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4299
var originalProject = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4323
var originalProject = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4351
var document = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
4367
var solution = workspace.
CurrentSolution
.AddProject("TestProject", "TestProject", LanguageNames.CSharp).Solution;
4423
var currentSolution = workspace.
CurrentSolution
;
4563
var solution = workspace.
CurrentSolution
;
4579
var solution = workspace.
CurrentSolution
;
4650
var solution = workspace.
CurrentSolution
;
4687
var solution = workspace.
CurrentSolution
;
4723
var solution = workspace.
CurrentSolution
;
4764
var solution = workspace.
CurrentSolution
;
4810
var solution = workspace.
CurrentSolution
;
4841
var solution = workspace.
CurrentSolution
;
4951
var solution = workspace.
CurrentSolution
;
4974
var solution = workspace.
CurrentSolution
;
4996
var solution = workspace.
CurrentSolution
;
5024
var solution = workspace.
CurrentSolution
;
5052
var solution = workspace.
CurrentSolution
;
5081
var solution = workspace.
CurrentSolution
;
5112
var solution = workspace.
CurrentSolution
;
5150
var solution = workspace.
CurrentSolution
;
5167
var solution = workspace.
CurrentSolution
;
5213
var solution = workspace.
CurrentSolution
;
5257
var solution = workspace.
CurrentSolution
;
5281
var solution = workspace.
CurrentSolution
;
5419
var s0 = workspace.
CurrentSolution
;
5465
var solution = workspace.
CurrentSolution
.AddProject(projInfo);
5494
var solution = workspace.
CurrentSolution
;
5548
var solution = workspace.
CurrentSolution
5576
var solution = workspace.
CurrentSolution
5596
var solution = workspace.
CurrentSolution
5610
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
5627
var project = workspace.
CurrentSolution
.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp);
5647
var project1 = workspace.
CurrentSolution
.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp);
5675
var project1 = workspace.
CurrentSolution
.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp);
5705
var project1 = workspace.
CurrentSolution
.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp);
5738
var project1 = workspace.
CurrentSolution
.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp);
5763
var project1 = workspace.
CurrentSolution
5815
var project = workspace.
CurrentSolution
.AddProject("TypeScript", "TypeScript", "TypeScript");
5836
var project1 = workspace.
CurrentSolution
5869
var document1 = workspace.
CurrentSolution
.GetRequiredDocument(documentId1);
5875
var document2 = workspace.
CurrentSolution
.GetRequiredDocument(documentId2);
SolutionTests\SolutionWithSourceGeneratorTests.cs (48)
48
var project = AddEmptyProject(workspace.
CurrentSolution
)
89
var project = AddEmptyProject(workspace.
CurrentSolution
)
137
var project = AddEmptyProject(workspace.
CurrentSolution
)
164
var project = AddEmptyProject(workspace.
CurrentSolution
)
253
var project = AddEmptyProject(workspace.
CurrentSolution
)
293
var project = AddEmptyProject(workspace.
CurrentSolution
)
337
var project = AddEmptyProject(workspace.
CurrentSolution
)
365
var projectBeforeChange = AddEmptyProject(workspace.
CurrentSolution
)
388
var solutionWithProjects = AddProjectWithReference(workspace.
CurrentSolution
, analyzerReference);
418
var solution = AddEmptyProject(workspace.
CurrentSolution
)
443
var project = AddEmptyProject(workspace.
CurrentSolution
)
457
var project = AddEmptyProject(workspace.
CurrentSolution
)
480
var project = AddEmptyProject(workspace.
CurrentSolution
)
500
var project = AddEmptyProject(workspace.
CurrentSolution
)
527
var project = AddEmptyProject(workspace.
CurrentSolution
)
575
var project = AddEmptyProject(workspace.
CurrentSolution
);
588
var project = AddEmptyProject(workspace.
CurrentSolution
)
600
Assert.NotSame(workspace.
CurrentSolution
, generatedDocument.Project.Solution);
612
var project = AddEmptyProject(workspace.
CurrentSolution
)
617
var generatedDocument = Assert.Single(await workspace.
CurrentSolution
.Projects.Single().GetSourceGeneratedDocumentsAsync());
623
Assert.Same(workspace.
CurrentSolution
, generatedDocument!.Project.Solution);
631
var originalAdditionalFile = AddEmptyProject(workspace.
CurrentSolution
)
644
Assert.Empty(await workspace.
CurrentSolution
.Projects.Single().GetSourceGeneratedDocumentsAsync());
659
var solution = AddEmptyProject(workspace.
CurrentSolution
)
668
var generatedDocument = Assert.Single(await workspace.
CurrentSolution
.GetRequiredProject(projectIdWithGenerator).GetSourceGeneratedDocumentsAsync());
690
var project = AddEmptyProject(workspace.
CurrentSolution
)
702
var document = await workspace.
CurrentSolution
.GetSourceGeneratedDocumentAsync(generatedDocument.Identity.DocumentId, CancellationToken.None);
718
var project = AddEmptyProject(workspace.
CurrentSolution
)
724
var documentToFreeze = workspace.
CurrentSolution
.Projects.Single().Documents.Single();
749
var project = AddEmptyProject(workspace.
CurrentSolution
)
778
var project = AddEmptyProject(workspace.
CurrentSolution
)
808
var originalDocument1 = AddEmptyProject(workspace.
CurrentSolution
, name: "Project1")
846
var project = AddEmptyProject(workspace.
CurrentSolution
);
870
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
903
var solution = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference).Solution;
928
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
948
var project0 = AddEmptyProject(workspace.
CurrentSolution
);
984
var project = AddEmptyProject(workspace.
CurrentSolution
)
1016
var project = AddEmptyProject(workspace.
CurrentSolution
)
1046
var project = AddEmptyProject(workspace.
CurrentSolution
)
1074
var project = AddEmptyProject(workspace.
CurrentSolution
)
1101
var project = AddEmptyProject(workspace.
CurrentSolution
)
1129
var project = AddEmptyProject(workspace.
CurrentSolution
)
1162
var project = AddEmptyProject(workspace.
CurrentSolution
)
1217
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
1252
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
1289
var project = AddEmptyProject(workspace.
CurrentSolution
).AddAnalyzerReference(analyzerReference);
1320
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 (88)
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);
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)
119
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\HierarchyItemToProjectIdMap.cs (1)
37
var candidateProjects = _workspace.
CurrentSolution
.Projects
Implementation\VisualStudioSupportsFeatureService.cs (1)
59
return SupportsRenameWorker(workspace.
CurrentSolution
.GetRelatedDocumentIds(documentId));
Implementation\VsRefactorNotifyService.cs (1)
183
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)
86
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)
185
=> this.Workspace.
CurrentSolution
.GetProject(projectId);
309
this.Workspace.
CurrentSolution
, _languageName, CancellationToken.None).ConfigureAwait(true);
320
return new ObjectList(ObjectListKind.Projects, flags, this, this.GetProjectListItems(this.Workspace.
CurrentSolution
, _languageName, flags));
481
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);
Packaging\PackageInstallerServiceFactory.cs (1)
481
var solution = Workspace.
CurrentSolution
;
Progression\GraphQueryManager.cs (2)
60
var solution = _workspace.
CurrentSolution
;
101
var solution = _workspace.
CurrentSolution
;
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
97
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)
297
var document = _threadingContext.JoinableTaskFactory.Run(() =>
CurrentSolution
.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask());
322
var currentSolution = this.
CurrentSolution
;
495
var originalProject =
CurrentSolution
.GetRequiredProject(projectId);
513
var parseOptionsService =
CurrentSolution
.GetRequiredProject(projectId).Services.GetRequiredService<IParseOptionsChangingService>();
916
if (
CurrentSolution
.FilePath is null || documentInfo.FilePath is null)
925
var solutionDirectory = PathUtilities.GetDirectoryName(this.
CurrentSolution
.FilePath);
931
if (PathUtilities.GetDirectoryName(
CurrentSolution
.GetProject(documentInfo.Id.ProjectId)?.FilePath) == solutionDirectory)
1009
var document = this.
CurrentSolution
.GetTextDocument(documentId);
1090
var document = this.
CurrentSolution
.GetTextDocument(documentId);
1205
var textBuffer = this.
CurrentSolution
.GetTextDocument(documentId)!.GetTextSynchronously(CancellationToken.None).Container.TryGetTextBuffer();
1222
var document =
CurrentSolution
.GetRequiredDocument(documentId);
1316
return
CurrentSolution
.GetRequiredProject(documentId.ProjectId).Language switch
1615
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);
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)
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
304
_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)
335
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 (1)
SemanticSearch\SemanticSearchDocumentNavigationService.cs (1)
31
Debug.Assert(documentId == SemanticSearchUtilities.GetQueryDocumentId(workspace.
CurrentSolution
));
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)
121
var document = workspace.
CurrentSolution
.GetRequiredDocument(documentId);
DocumentOutline\DocumentOutlineTestsBase.cs (2)
100
var solution = workspace.
CurrentSolution
;
134
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)
91
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)
28
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()
143
Dim startDocument = workspace.
CurrentSolution
.GetDocument(originalDocument.Id)
148
Dim results = Await codelensService.FindReferenceLocationsAsync(workspace.
CurrentSolution
, startDocument.Id, node, CancellationToken.None)
152
Dim definitionText = Await workspace.
CurrentSolution
.GetDocument(definitionDocument.Id).GetTextAsync()
183
Dim document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id)
201
Dim currentDocument = workspace.
CurrentSolution
.GetDocument(document.Id)
223
workspace.TryApplyChanges(workspace.
CurrentSolution
.WithAnalyzerReferences({analyzerReference}))
225
Dim document = workspace.
CurrentSolution
.GetDocument(workspace.Documents.First().Id)
274
Dim mappedDocument = testWorkspace.
CurrentSolution
.GetDocument(mappedTestDocument.Id)
312
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)
74
targetDocument = visualStudioWorkspace.
CurrentSolution
.GetDocument(targetDocument.Id)
102
targetDocument = visualStudioWorkspace.
CurrentSolution
.GetDocument(targetDocument.Id)
Microsoft.VisualStudio.LanguageServices.Xaml (4)
Implementation\XamlProjectService.cs (4)
165
var documentId = _workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(filePath).Single(d => d.ProjectId == project.Id);
169
var document = _workspace.
CurrentSolution
.GetRequiredDocument(documentId);
201
var document = _workspace.
CurrentSolution
.GetDocument(documentId);
255
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 (75)
Remote\RemoteHostClientServiceFactoryTests.cs (1)
64
Assert.True(workspace.
CurrentSolution
.CompilationState.TryGetStateChecksums(out _));
Services\AssetProviderTests.cs (3)
75
var solution = workspace.
CurrentSolution
;
103
var solution = workspace.
CurrentSolution
;
128
var project = workspace.
CurrentSolution
.Projects.First();
Services\ServiceHubServicesTests.cs (14)
68
var solution = workspace.
CurrentSolution
;
90
var solution = workspace.
CurrentSolution
;
145
var solution = workspace.
CurrentSolution
;
196
var solution = workspace.
CurrentSolution
;
207
workspace.
CurrentSolution
,
208
workspace.
CurrentSolution
.Projects.Single().Documents.Single(),
267
var solution = workspace.
CurrentSolution
;
312
var solution = workspace.
CurrentSolution
;
332
solution = workspace.
CurrentSolution
;
346
solution = workspace.
CurrentSolution
;
780
var project = workspace.
CurrentSolution
1489
var remoteSolution = remoteWorkspace.
CurrentSolution
;
1525
solution = localWorkspace.
CurrentSolution
;
1528
var currentRemoteSolution = remoteWorkspace.
CurrentSolution
;
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