1504 references to CurrentSolution
Analyzer.Utilities.UnitTests (2)
FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisTests.cs (1)
1299Project project = new AdhocWorkspace().CurrentSolution
Options\SymbolNamesWithValueOptionTests.cs (1)
423var project = new AdhocWorkspace().CurrentSolution
AnalyzerRunner (6)
CodeRefactoringRunner.cs (1)
52var solution = _workspace.CurrentSolution;
DiagnosticAnalyzerRunner.cs (2)
66var solution = _workspace.CurrentSolution; 80var solution = _workspace.CurrentSolution;
IncrementalAnalyzerRunner.cs (1)
46var persistentStorage = await persistentStorageService.GetStorageAsync(SolutionKey.ToSolutionKey(_workspace.CurrentSolution), cancellationToken).ConfigureAwait(false);
Program.cs (2)
93ShowSolutionStatistics(workspace.CurrentSolution, cancellationToken); 99await ShowCompilerDiagnosticsAsync(workspace.CurrentSolution, cancellationToken).ConfigureAwait(false);
IdeBenchmarks (6)
FormatterBenchmarks.cs (2)
47var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id); 60var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (1)
130var items = await BenchmarksHelpers.GenerateInheritanceMarginItemsAsync(workspace.CurrentSolution, cancellationToken).ConfigureAwait(false);
RegexClassifierBenchmarks.cs (1)
73var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
SQLitePersistentStorageBenchmark.cs (2)
68var solution = _workspace.CurrentSolution; 72_document = _workspace.CurrentSolution.Projects.Single().Documents.Single();
IdeCoreBenchmarks (13)
FindReferencesBenchmarks.cs (1)
87var storage = await storageService.GetStorageAsync(SolutionKey.ToSolutionKey(_workspace.CurrentSolution), CancellationToken.None);
FormatterBenchmarks.cs (1)
49var solution = new AdhocWorkspace().CurrentSolution
IncrementalSourceGeneratorBenchmarks.cs (1)
145var project = _workspace.CurrentSolution.Projects.Single(p => p.Name == "Microsoft.CodeAnalysis.Workspaces(netstandard2.0)");
NavigateToBenchmarks.cs (7)
86var docCount = _workspace.CurrentSolution.Projects.SelectMany(p => p.Documents).Count(); 111foreach (var project in _workspace.CurrentSolution.Projects) 145foreach (var project in _workspace.CurrentSolution.Projects) 164foreach (var project in _workspace.CurrentSolution.Projects) 186var storage = await storageService.GetStorageAsync(SolutionKey.ToSolutionKey(_workspace.CurrentSolution), CancellationToken.None); 191var tasks = _workspace.CurrentSolution.Projects.SelectMany(p => p.Documents).Select(d => Task.Run( 215var solution = _workspace.CurrentSolution;
ProjectOperationBenchmarks.cs (1)
58var solution = _workspace.CurrentSolution;
RenameBenchmarks.cs (1)
43_solution = new AdhocWorkspace().CurrentSolution
SwitchStatementBenchmarks.cs (1)
67var solution = workspace.CurrentSolution
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticProject.cs (1)
42.CurrentSolution
DiagnosticVerifier.cs (1)
160Solution = 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)
320var project = new AdhocWorkspace().CurrentSolution
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
320var project = new AdhocWorkspace().CurrentSolution
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
179var updatedDocument = workspace.CurrentSolution.GetRequiredDocument(document.Id);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (224)
Classification\SemanticClassifierTests.cs (2)
37var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.First().Id); 3919var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.First().Id);
Classification\SyntacticClassifierTests.cs (3)
24var document = workspace.CurrentSolution.Projects.First().Documents.First(); 6131var document = workspace.CurrentSolution.Projects.First().Documents.First(); 6161var document = workspace.CurrentSolution.Projects.First().Documents.First();
Classification\TotalClassifierTests.cs (1)
35var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.First().Id);
CodeActions\ApplyChangesOperationTests.cs (1)
241var originalSolution = workspace.CurrentSolution;
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (1)
918var documentToModify = workspace.CurrentSolution.GetDocument(documentToModifyId);
CodeGeneration\SyntaxGeneratorTests.cs (2)
35var solution = workspace.CurrentSolution; 69var solution = workspace.CurrentSolution;
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
181var document = workspace.CurrentSolution.GetDocument(documentId);
Completion\CompletionProviders\CrefCompletionProviderTests.cs (1)
446var document = workspace.CurrentSolution.GetRequiredDocument(hostDocument.Id);
Completion\CompletionProviders\ObjectInitializerCompletionProviderTests.cs (2)
690var document = workspace.CurrentSolution.GetDocument(hostDocument.Id); 1350var document = workspace.CurrentSolution.GetDocument(hostDocument.Id);
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (10)
3006var solution = testWorkspace.CurrentSolution; 3489var solution = testWorkspace.CurrentSolution; 3548var solution = testWorkspace.CurrentSolution; 3845var document = workspace.CurrentSolution.GetRequiredDocument(testDocument.Id); 3979var compilation = await workspace.CurrentSolution.Projects.First(p => p.Name == "P3").GetCompilationAsync(); 3984var p1 = workspace.CurrentSolution.Projects.First(p => p.Name == "P1"); 3990var document = workspace.CurrentSolution.GetRequiredDocument(testDocument.Id); 4037var origComp = await workspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None); 4042var project = workspace.CurrentSolution.Projects.Single(); 4048var document = workspace.CurrentSolution.GetRequiredDocument(testDocument.Id);
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (2)
376var document = workspace.CurrentSolution.GetDocument(testDocument.Id); 387var currentDocument = workspace.CurrentSolution.GetDocument(testDocument.Id);
Completion\CompletionServiceTests.cs (7)
51var document = workspace.CurrentSolution 109var document = workspace.CurrentSolution 135Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.WithOptions( 136workspace.CurrentSolution.Options.WithChangedOption(new OptionKey(ThirdPartyOption.Instance, LanguageNames.CSharp), 1)))); 138var document = workspace.CurrentSolution.GetDocument(testDocument.Id); 206var project = SolutionUtilities.AddEmptyProject(workspace.CurrentSolution) 212var document = workspace.CurrentSolution.Projects.Single().Documents.Single();
Debugging\LocationInfoGetterTests.cs (1)
29workspace.CurrentSolution.Projects.Single().Documents.Single(),
Debugging\NameResolverTests.cs (2)
24var nameResolver = new BreakpointResolver(workspace.CurrentSolution, searchText); 36var results = await debugInfo.ResolveBreakpointsAsync(workspace.CurrentSolution, "goo", CancellationToken.None);
Debugging\ProximityExpressionsGetterTests.cs (1)
76var document = workspace.CurrentSolution.GetDocument(testDocument.Id);
DecompiledSource\DecompiledSourceFormattingTests.cs (1)
256var document = workspace.CurrentSolution.Projects.Single().Documents.Single();
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (16)
61var newSolution = workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]) 65var document = workspace.CurrentSolution.Projects.Single().Documents.Single(); 92ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 94var ideEngineDocument = ideEngineWorkspace.CurrentSolution.Projects.Single().Documents.Single(); 107var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result; 166var additionalDocId = DocumentId.CreateNewId(workspace.CurrentSolution.Projects.Single().Id); 172workspace.TryApplyChanges(workspace.CurrentSolution 176var sourceDocument = workspace.CurrentSolution.Projects.Single().Documents.Single(); 204workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 206var ideEngineDocument = workspace.CurrentSolution.Projects.Single().Documents.Single(); 260ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 262var ideEngineDocument = ideEngineWorkspace.CurrentSolution.Projects.Single().Documents.Single(); 281var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result; 340var compilerEngineCompilation = (CSharpCompilation)(await compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None)); 759Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences( 764var project = workspace.CurrentSolution.Projects.Single();
EditAndContinue\ActiveStatementTrackingServiceTests.cs (1)
66var solution = workspace.CurrentSolution;
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (3)
39Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution 53var solution = workspace.CurrentSolution; 363var solution = workspace.CurrentSolution;
EncapsulateField\EncapsulateFieldTestState.cs (1)
35TargetDocument = Workspace.CurrentSolution.GetDocument(_testDocument.Id);
ExtractMethod\ExtractMethodBase.cs (3)
123var document = workspace.CurrentSolution.GetDocument(testDocument.Id); 163var document = workspace.CurrentSolution.GetDocument(testDocument.Id); 188var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
ExtractMethod\ExtractMethodTests.cs (1)
11481var solution = new AdhocWorkspace().CurrentSolution;
Formatting\CodeCleanupTests.cs (5)
787var project = workspace.CurrentSolution.Projects.Single(); 807var document = workspace.CurrentSolution.GetDocument(hostdoc.Id); 824var document = workspace.CurrentSolution.GetDocument(hostdoc.Id); 884var solution = workspace.CurrentSolution.WithAnalyzerReferences( 906var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);
Formatting\FormattingEngineTests.cs (1)
439var document = workspace.CurrentSolution.Projects.Single().Documents.Single();
Formatting\Indentation\SmartIndenterEnterOnTokenTests.cs (2)
1405var document = workspace.CurrentSolution.GetDocument(hostdoc.Id); 1446var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (1)
3418var document = workspace.CurrentSolution.GetDocument(testDocument.Id);
Intents\IntentTestsBase.cs (2)
106var priorDocument = workspace.CurrentSolution.GetRequiredDocument(testDocument.Id); 117var textDiffService = workspace.CurrentSolution.Services.GetRequiredService<IDocumentTextDifferencingService>();
LineSeparators\LineSeparatorTests.cs (1)
598var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.First().Id);
MoveToNamespace\MoveToNamespaceTests.cs (1)
1446var document = workspace.CurrentSolution.GetRequiredDocument(testDocument.Id);
NavigateTo\NavigateToSearcherTests.cs (10)
145workspace.CurrentSolution, 185workspace.CurrentSolution, 222workspace.CurrentSolution, 259workspace.CurrentSolution, 290workspace.CurrentSolution, 348workspace.CurrentSolution, 391var project = workspace.CurrentSolution.Projects.Single(); 399workspace.CurrentSolution, 451var project = workspace.CurrentSolution.Projects.Single(); 459workspace.CurrentSolution,
OnTheFlyDocs\OnTheFlyDocsUtilitiesTests.cs (3)
32var solution = workspace.CurrentSolution; 68var solution = workspace.CurrentSolution; 114var solution = workspace.CurrentSolution;
Organizing\AbstractOrganizerTests.cs (1)
29var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (2)
168var document = masWorkspace!.CurrentSolution.GetRequiredDocument(info.DocumentId); 223var project = workspace.CurrentSolution.Projects.First();
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (10)
170var implProject = workspace.CurrentSolution.Projects.First(); 237var implProject = workspace.CurrentSolution.Projects.First(); 298var implProject = workspace.CurrentSolution.Projects.First(); 353var implProject = workspace.CurrentSolution.Projects.First(); 404var implProject = workspace.CurrentSolution.Projects.First(); 469var implProject = workspace.CurrentSolution.Projects.First(); 527var implProject = workspace.CurrentSolution.Projects.First(); 534implProject = workspace.CurrentSolution.Projects.First().AddMetadataReference(MetadataReference.CreateFromFile(dllFilePath)); 542implProject = workspace.CurrentSolution.Projects.First(); 548implProject = workspace.CurrentSolution.Projects.First().AddMetadataReference(MetadataReference.CreateFromFile(realImplementationDllFilePath));
PdbSourceDocument\PdbSourceDocumentTests.cs (3)
484var implProject = workspace.CurrentSolution.Projects.First(); 531var implProject = workspace.CurrentSolution.Projects.First(); 936var project = workspace.CurrentSolution.Projects.First();
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (2)
211workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 215var document = workspace.CurrentSolution.Projects.First().Documents.First();
QuickInfo\SemanticQuickInfoSourceTests.cs (3)
52var document = workspace.CurrentSolution.GetRequiredDocument(documentId); 133var document = workspace.CurrentSolution.GetRequiredDocument(documentId); 302var document = workspace.CurrentSolution.GetRequiredDocument(documentId);
QuickInfo\SyntacticQuickInfoSourceTests.cs (1)
604var document = workspace.CurrentSolution.Projects.First().Documents.First();
Rename\CSharpInlineRenameServiceTests.cs (1)
62var document = workspace.CurrentSolution.GetRequiredDocument(documentId);
StringIndentation\StringIndentationTests.cs (1)
30var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.First().Id);
SymbolKey\SymbolKeyTests.cs (5)
43var solution = workspace.CurrentSolution; 78var solution = workspace.CurrentSolution; 117var solution = workspace.CurrentSolution; 163var solution = workspace.CurrentSolution; 194var solution = workspace.CurrentSolution;
Workspaces\WorkspaceTests_EditorFeatures.cs (106)
62var solution = workspace.CurrentSolution; 74Assert.Equal(solution, workspace.CurrentSolution); 84var solution = workspace.CurrentSolution; 91solution = workspace.CurrentSolution; 100var solution = workspace.CurrentSolution; 106solution = workspace.CurrentSolution; 115var solution = workspace.CurrentSolution; 120solution = workspace.CurrentSolution; 122solution = workspace.CurrentSolution; 131var solution = workspace.CurrentSolution; 142var solution = workspace.CurrentSolution; 156var solution = workspace.CurrentSolution; 183var solution = workspace.CurrentSolution; 222workspace.TryApplyChanges(workspace.CurrentSolution); 225var tree1 = await workspace.CurrentSolution 232var tree2 = await workspace.CurrentSolution 241var currentSnapshot = workspaceSnapshotBuilder.CurrentSolution; 259var solution = workspace.CurrentSolution; 273var solution = workspace.CurrentSolution; 284var snapshot = workspace.CurrentSolution; 295var solution = workspace.CurrentSolution; 312var solution = workspace.CurrentSolution; 323var snapshot = workspace.CurrentSolution; 334var solution = workspace.CurrentSolution; 351var solution = workspace.CurrentSolution; 361Assert.Empty(workspace.CurrentSolution.Projects); 368var solution = workspace.CurrentSolution; 383var solution = workspace.CurrentSolution; 393Assert.Empty(workspace.CurrentSolution.Projects.Single().Documents); 402var solution = workspace.CurrentSolution; 410var snapshot = workspace.CurrentSolution; 421var solution = workspace.CurrentSolution; 432var snapshot = workspace.CurrentSolution; 445var solution = workspace.CurrentSolution; 460var snapshot = workspace.CurrentSolution; 478var solutionX = workspace.CurrentSolution; 497var solutionY = workspace.CurrentSolution; 515var solutionZ = workspace.CurrentSolution; 536var solutionX = workspace.CurrentSolution; 555var solutionY = workspace.CurrentSolution; 579var cs = workspace.CurrentSolution; 608var solutionX = workspace.CurrentSolution; 627var solutionY = workspace.CurrentSolution; 654var cs = workspace.CurrentSolution; 676var cs = workspace.CurrentSolution; 704var solution = workspace.CurrentSolution; 715solution = workspace.CurrentSolution; 740Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 743var oldSolution = workspace.CurrentSolution; 747Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 771var oldSolution = workspace.CurrentSolution; 777Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 792var oldSolution = workspace.CurrentSolution; 798Assert.Equal(0, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1064var project = workspace.CurrentSolution.Projects.Single(); 1088var project = workspace.CurrentSolution.Projects.Single(); 1120var project = workspace.CurrentSolution.Projects.Single(); 1124var oldSolution = workspace.CurrentSolution; 1133var doc = workspace.CurrentSolution.GetAdditionalDocument(additionalDoc.Id); 1153var project = workspace.CurrentSolution.Projects.Single(); 1157var oldSolution = workspace.CurrentSolution; 1166var doc = workspace.CurrentSolution.GetAnalyzerConfigDocument(analyzerConfigDoc.Id); 1243var project = workspace.CurrentSolution.Projects.Single(); 1247var oldSolution = workspace.CurrentSolution; 1250var doc = workspace.CurrentSolution.GetAdditionalDocument(additionalDoc.Id); 1254Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1255Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1259oldSolution = workspace.CurrentSolution; 1264Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1265Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1266Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1279var project = workspace.CurrentSolution.Projects.Single(); 1283var oldSolution = workspace.CurrentSolution; 1286var doc = workspace.CurrentSolution.GetAnalyzerConfigDocument(analyzerConfigDoc.Id); 1290Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1291Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1295oldSolution = workspace.CurrentSolution; 1300Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1301Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1302Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1317var project = workspace.CurrentSolution.Projects.Single(); 1323Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1324Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1327project = workspace.CurrentSolution.Projects.Single(); 1330Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1331Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1332Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1345var project = workspace.CurrentSolution.Projects.Single(); 1351Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1352Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1355project = workspace.CurrentSolution.Projects.Single(); 1358Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1359Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1360Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1375var documentIdsWithFilePath = workspace.CurrentSolution.GetDocumentIdsWithFilePath(docFilePath); 1379documentIdsWithFilePath = workspace.CurrentSolution.GetDocumentIdsWithFilePath(additionalDocFilePath); 1395var documentIdsWithFilePath = workspace.CurrentSolution.GetDocumentIdsWithFilePath(docFilePath); 1399documentIdsWithFilePath = workspace.CurrentSolution.GetDocumentIdsWithFilePath(analyzerConfigDocFilePath); 1474var solution = workspace1.CurrentSolution; 1488var currentOptionValue = workspace1.CurrentSolution.Options.GetOption(optionKey); 1511var beforeSolutionForPrimaryWorkspace = primaryWorkspace.CurrentSolution; 1512var beforeSolutionForSecondaryWorkspace = secondaryWorkspace.CurrentSolution; 1525Assert.NotEqual(beforeSolutionForPrimaryWorkspace, primaryWorkspace.CurrentSolution); 1526Assert.NotEqual(beforeSolutionForSecondaryWorkspace, secondaryWorkspace.CurrentSolution); 1538Assert.NotSame(beforeSolutionForPrimaryWorkspace, primaryWorkspace.CurrentSolution); 1539Assert.NotSame(beforeSolutionForSecondaryWorkspace, secondaryWorkspace.CurrentSolution);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
62var solution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (22)
Diagnostics\Suppression\SuppressionTests.cs (3)
447workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 758var solution = workspace.CurrentSolution; 1000var solution = workspace.CurrentSolution;
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (14)
302var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 369var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 396var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source); 430var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 463var oldSolution = workspace.CurrentSolution. 512var oldSolution = workspace.CurrentSolution; 517var newSolution = workspace.CurrentSolution.WithDocumentText(documentId, SourceText.From(source2)); 543var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source); 581var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 620var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 661var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 708var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 742var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 798var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1);
SemanticSearch\CSharpSemanticSearchServiceTests.cs (5)
74var solution = workspace.CurrentSolution; 278var solution = workspace.CurrentSolution; 331var solution = workspace.CurrentSolution; 396var solution = workspace.CurrentSolution; 453var solution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (3)
Formatting\FormattingMultipleSpanTests.cs (1)
164var project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.CSharp);
OrganizeImports\OrganizeUsingsTests.cs (2)
29var project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.CSharp); 90var project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.CSharp);
Microsoft.CodeAnalysis.EditorFeatures (21)
CodeActions\CodeActionEditHandlerService.cs (5)
56var oldSolution = workspace.CurrentSolution; 119var oldSolution = workspace.CurrentSolution; 312var openDocument = workspace.CurrentSolution.GetRequiredDocument(renameOperation.DocumentId); 346var latestDocument = workspace.CurrentSolution.GetDocument(documentId); 359var openDocument = workspace.CurrentSolution.GetRequiredDocument(documentId);
EditorConfigSettings\Aggregator\SettingsAggregator.cs (2)
37var currentSolution = _workspace.CurrentSolution.SolutionState; 95UpdateProviders(_workspace.CurrentSolution.SolutionState);
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (1)
54var solution = Workspace.CurrentSolution;
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (1)
74var solution = Workspace.CurrentSolution;
IntelliSense\NavigationActionFactory.cs (1)
60var solution = workspace.CurrentSolution;
Navigation\IDocumentNavigationServiceExtensions.cs (1)
78var document = workspace.CurrentSolution.GetTextDocument(documentId);
Remote\SolutionChecksumUpdater.cs (2)
169var solution = _workspace.CurrentSolution; 200var solution = _workspace.CurrentSolution;
RenameTracking\RenameTrackingTaggerProvider.cs (1)
69var document = workspace.CurrentSolution.GetDocument(documentId);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (1)
154var finalSolution = workspace.CurrentSolution;
Shared\Extensions\WorkspaceExtensions.cs (2)
24var oldSolution = workspace.CurrentSolution; 41var oldSolution = workspace.CurrentSolution;
Shared\Preview\PreviewWorkspace.cs (4)
50var document = this.CurrentSolution.GetTextDocument(documentId); 75var document = this.CurrentSolution.GetRequiredDocument(documentId); 84var document = this.CurrentSolution.GetRequiredAdditionalDocument(documentId); 93var document = this.CurrentSolution.GetRequiredAnalyzerConfigDocument(documentId);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (49)
BraceMatching\AbstractBraceMatcherTests.cs (1)
27var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
BracePairs\AbstractBracePairsTests.cs (1)
30var document = workspace.CurrentSolution.Projects.Single().Documents.Single();
CodeLens\AbstractCodeLensTest.cs (8)
25var document = workspace.CurrentSolution.GetDocument(annotatedDocument.Id); 35var result = await new CodeLensReferencesService().GetReferenceCountAsync(workspace.CurrentSolution, annotatedDocument.Id, 53var document = workspace.CurrentSolution.GetDocument(annotatedDocument.Id); 62var result = await new CodeLensReferencesService().FindReferenceLocationsAsync(workspace.CurrentSolution, 79var document = workspace.CurrentSolution.GetDocument(annotatedDocument.Id); 88var result = await new CodeLensReferencesService().FindReferenceMethodsAsync(workspace.CurrentSolution, 105var document = workspace.CurrentSolution.GetDocument(annotatedDocument.Id); 114var actual = await new CodeLensReferencesService().GetFullyQualifiedNameAsync(workspace.CurrentSolution,
Completion\AbstractCompletionProviderTests.cs (7)
371var currentDocument = workspace.CurrentSolution.GetDocument(workspaceFixture.Target.CurrentDocument.Id); 700var document = workspace.CurrentSolution.GetRequiredDocument(workspaceFixture.Target.CurrentDocument.Id); 963var solution = testWorkspace.CurrentSolution; 1019var solution = testWorkspace.CurrentSolution; 1048var solution = testWorkspace.CurrentSolution; 1283var document = workspace.CurrentSolution.GetDocument(hostDocument.Id); 1328var document = workspace.CurrentSolution.GetDocument(documentId);
Debugging\AbstractDataTipInfoGetterTests.cs (1)
71workspace.CurrentSolution.Projects.First().Documents.First(),
Diagnostics\DiagnosticTaggerWrapper.cs (1)
40workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
Diagnostics\GenerateType\GenerateTypeTestState.cs (4)
37TriggeredProject = Workspace.CurrentSolution.GetProject(_testDocument.Project.Id); 42ProjectToBeModified = Workspace.CurrentSolution.GetProject(_testDocument.Project.Id); 46ProjectToBeModified = Workspace.CurrentSolution.Projects.FirstOrDefault(proj => proj.Name.Equals(projectToBeModified)); 50InvocationDocument = Workspace.CurrentSolution.GetDocument(_testDocument.Id);
DocumentTracking\FirstDocumentIsActiveAndVisibleDocumentTrackingService.cs (1)
26=> _workspace.CurrentSolution.Projects.First().DocumentIds.First();
ExtractInterface\ExtractInterfaceTestState.cs (3)
56OriginalSolution = Workspace.CurrentSolution; 64ExtractFromDocument = Workspace.CurrentSolution.GetDocument(_testDocument.Id); 122return Workspace.CurrentSolution;
Formatting\AbstractNewDocumentFormattingServiceTests.cs (2)
28var solution = workspace.CurrentSolution; 30var document = workspace.CurrentSolution.Projects.First().Documents.First();
Formatting\CoreFormatterTestsBase.cs (1)
183var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (2)
38var document = workspace.CurrentSolution.GetDocument(hostDocument.Id); 62var document = workspace.CurrentSolution.GetDocument(hostDocument.Id);
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
50var document = workspace.CurrentSolution.GetDocument(testDocument.Id);
NavigateTo\AbstractNavigateToTests.cs (1)
242=> [_workspace.CurrentSolution.Projects.First().DocumentIds.First()];
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (1)
27var project = workspace.CurrentSolution.Projects.Single();
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
26var project = workspace.CurrentSolution.Projects.Single();
Rename\RenamerTests.cs (3)
41var solution = workspace.CurrentSolution; 176var solution = workspace.CurrentSolution; 215var solution = workspace.CurrentSolution;
SignatureHelp\AbstractSignatureHelpProviderTests.cs (3)
349var document = testWorkspace.CurrentSolution.GetDocument(documentId); 352document = testWorkspace.CurrentSolution.GetDocument(documentId); 468var document = testWorkspace.CurrentSolution.GetDocument(documentId);
SpellCheck\AbstractSpellCheckSpanTests.cs (1)
28var document = workspace.CurrentSolution.Projects.Single().Documents.Single();
Structure\AbstractSyntaxStructureProviderTests.cs (2)
50var document = workspace.CurrentSolution.GetRequiredDocument(hostDocument.Id); 69var document = workspace.CurrentSolution.GetRequiredDocument(hostDocument.Id);
TaskList\AbstractTaskListTests.cs (1)
38var document = workspace.CurrentSolution.GetRequiredDocument(documentId);
Workspaces\EditorTestHostDocument.cs (2)
160foreach (var linkedId in workspace.CurrentSolution.GetDocumentIdsWithFilePath(FilePath).Concat(this.Id)) 170var document = threadingContext.JoinableTaskFactory.Run(() => workspace.CurrentSolution.GetSourceGeneratedDocumentAsync(testDocument.Id, CancellationToken.None).AsTask());
Workspaces\TestWorkspaceFixture.cs (1)
93return 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)
49workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 56var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 293var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 356workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 385var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 769var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 1073sourceDocument = workspace.CurrentSolution.Projects.Single().Documents.Single();
CodeGeneration\AbstractCodeGenerationTests.cs (1)
31var project = workspace.CurrentSolution
CodeGeneration\CodeGenerationTests.cs (3)
879this.Document = Workspace.CurrentSolution.Projects.Single().Documents.Single(); 890var semanticModel = await workspace.CurrentSolution.Projects.Single().Documents.Single().GetSemanticModelAsync(); 895public Solution Solution { get { return Workspace.CurrentSolution; } }
CodeRefactorings\CodeRefactoringServiceTest.cs (5)
48var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 87var document = workspace.CurrentSolution.Projects.Single().Documents.Single(); 106var project = workspace.CurrentSolution.Projects.Single(); 165var project = workspace.CurrentSolution.Projects.Single() 204var project = workspace.CurrentSolution.Projects.Single()
Completion\CompletionServiceTests.cs (1)
43var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (24)
60workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 69workspace.CurrentSolution.Projects.Single(), documentId: null, diagnosticIds: null, shouldIncludeAnalyzer: null, 84workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 98workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 113workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 133workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 152workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 240var solution = workspace.CurrentSolution; 276var project = workspace.CurrentSolution.Projects.Single(); 287var project = workspace.CurrentSolution.Projects.Single(); 298var project = workspace.CurrentSolution.Projects.Single(); 323var solution = workspace.CurrentSolution; 455workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 457var project = workspace.CurrentSolution.Projects.Single(); 567workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 569var project = workspace.CurrentSolution.Projects.Single(); 643workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 644var project = workspace.CurrentSolution.Projects.Single(); 682var project = workspace.CurrentSolution.Projects.Single(); 693project = workspace.CurrentSolution.Projects.Single(); 759workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 761var project = workspace.CurrentSolution.Projects.Single(); 802Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(new TestGeneratorReference(generator)).Solution)); 804var project = workspace.CurrentSolution.Projects.Single();
Diagnostics\DiagnosticDataTests.cs (5)
112var document = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp).AddDocument("TestDocument", code); 139var additionalDocument = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 175var additionalDocument = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 223var project = workspace.CurrentSolution.GetRequiredProject(documentId.ProjectId); 260var firstDocument = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (2)
57workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences( 65var document = workspace.CurrentSolution.GetDocument(documentId);
EditAndContinue\EditAndContinueLanguageServiceTests.cs (4)
70solution = workspace.CurrentSolution; 119await localWorkspace.ChangeSolutionAsync(localWorkspace.CurrentSolution 124var solution = localWorkspace.CurrentSolution; 260solution = workspace.CurrentSolution;
FindSymbols\SymbolTreeInfoTests.cs (4)
21var solution = workspace.CurrentSolution; 42var solution = workspace.CurrentSolution; 65var solution = workspace.CurrentSolution; 87var solution = workspace.CurrentSolution;
Formatting\InferredIndentationTests.cs (3)
26var options = await testWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None); 39var options = await testWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None); 53var options = await testWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None);
InheritanceMargin\InheritanceMarginTests.cs (3)
97var document = testWorkspace.CurrentSolution.GetRequiredDocument(testHostDocument.Id); 162var docSpan = await actualDocumentSpans[i].TryRehydrateAsync(workspace.CurrentSolution, CancellationToken.None); 337var document = testWorkspace.CurrentSolution.GetRequiredDocument(testHostDocument.Id);
LanguageServer\VSTypeScriptHandlerTests.cs (1)
134var locations = await GetAnnotatedLocationsAsync(testWorkspace, testWorkspace.CurrentSolution);
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (5)
75var solution = workspace.CurrentSolution; 78var text = await workspace.CurrentSolution.GetRequiredDocument(documentId).GetTextAsync(); 81var linkedText = await workspace.CurrentSolution.GetRequiredDocument(linkedDocumentId).GetTextAsync(); 91Assert.Equal(s_expectedCode, (await workspace.CurrentSolution.GetRequiredDocument(documentId).GetTextAsync()).ToString()); 92Assert.Equal(s_expectedCode, (await workspace.CurrentSolution.GetRequiredDocument(linkedDocumentId).GetTextAsync()).ToString());
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (2)
77get { return Workspace.CurrentSolution; } 315var document = Workspace.CurrentSolution.GetRequiredDocument(testDocument.Id);
Preview\PreviewWorkspaceTests.cs (22)
31Assert.NotNull(previewWorkspace.CurrentSolution); 39Assert.NotNull(previewWorkspace.CurrentSolution); 46using var previewWorkspace = new PreviewWorkspace(custom.CurrentSolution); 47Assert.NotNull(previewWorkspace.CurrentSolution); 54var solution = previewWorkspace.CurrentSolution; 58var newSolution = previewWorkspace.CurrentSolution.RemoveProject(project.Id); 61Assert.Equal(0, previewWorkspace.CurrentSolution.ProjectIds.Count); 68var solution = previewWorkspace.CurrentSolution; 72var addedSolution = previewWorkspace.CurrentSolution.Projects.First() 76Assert.Equal(1, previewWorkspace.CurrentSolution.Projects.First().MetadataReferences.Count); 77Assert.Equal(1, previewWorkspace.CurrentSolution.Projects.First().DocumentIds.Count); 80var changedSolution = previewWorkspace.CurrentSolution.Projects.First().Documents.First().WithText(SourceText.From(text)).Project.Solution; 82Assert.Equal(previewWorkspace.CurrentSolution.Projects.First().Documents.First().GetTextAsync().Result.ToString(), text); 84var removedSolution = previewWorkspace.CurrentSolution.Projects.First() 85.RemoveMetadataReference(previewWorkspace.CurrentSolution.Projects.First().MetadataReferences[0]) 86.RemoveDocument(previewWorkspace.CurrentSolution.Projects.First().DocumentIds[0]).Solution; 89Assert.Equal(0, previewWorkspace.CurrentSolution.Projects.First().MetadataReferences.Count); 90Assert.Equal(0, previewWorkspace.CurrentSolution.Projects.First().DocumentIds.Count); 97var solution = previewWorkspace.CurrentSolution; 119var storage = await persistentService.GetStorageAsync(SolutionKey.ToSolutionKey(previewWorkspace.CurrentSolution), CancellationToken.None); 129Assert.NotNull(previewWorkspace.CurrentSolution); 166var project = previewWorkspace.CurrentSolution.Projects.Single();
RenameTracking\RenameTrackingTestState.cs (2)
170var document = this.Workspace.CurrentSolution.GetDocument(HostDocument.Id); 200await operations[0].TryApplyAsync(this.Workspace, this.Workspace.CurrentSolution, CodeAnalysisProgress.None, CancellationToken.None);
Snippets\RoslynLSPSnippetConvertTests.cs (3)
402var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.First().Id); 413var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.First().Id); 495var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.First().Id);
StackTraceExplorer\StackTraceExplorerTests.cs (7)
40var definition = await service.TryFindDefinitionAsync(workspace.CurrentSolution, stackFrame, StackFrameSymbolPart.Method, CancellationToken.None); 46var doc = workspace.CurrentSolution.GetRequiredDocument(cursorDoc.Id); 55var expectedDefinition = expectedSymbol.ToNonClassifiedDefinitionItem(workspace.CurrentSolution, includeHiddenLocations: true); 824var definition = await service.TryFindDefinitionAsync(workspace.CurrentSolution, parsedFrame, StackFrameSymbolPart.Method, CancellationToken.None); 854var definition = await service.TryFindDefinitionAsync(workspace.CurrentSolution, frame, StackFrameSymbolPart.Method, CancellationToken.None); 892var (document, line) = service.GetDocumentAndLine(workspace.CurrentSolution, frame); 931var (document, line) = service.GetDocumentAndLine(workspace.CurrentSolution, frame);
Structure\BlockStructureServiceTests.cs (1)
116var document = workspace.CurrentSolution.GetDocument(hostDocument.Id);
Structure\StructureTaggerTests.cs (1)
402var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);
SymbolFinder\FindSymbolAtPositionTests.cs (1)
21var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.Single().Id);
SymbolFinder\SymbolFinderTests.cs (20)
58var solution = workspace.CurrentSolution; 99var solution = workspace.CurrentSolution; 146var solution = workspace.CurrentSolution; 191var solution = workspace.CurrentSolution; 232var solution = workspace.CurrentSolution; 274var solution = workspace.CurrentSolution; 316var solution = workspace.CurrentSolution; 356var solution = workspace.CurrentSolution; 397var solution = workspace.CurrentSolution; 437var solution = workspace.CurrentSolution; 468var solution = workspace.CurrentSolution; 517var solution = workspace.CurrentSolution; 569var solution = workspace.CurrentSolution; 596var solution = workspace.CurrentSolution; 643var solution = workspace.CurrentSolution; 669var solution = workspace.CurrentSolution; 733var solution = workspace.CurrentSolution; 776var solution = workspace.CurrentSolution; 804var solution = workspace.CurrentSolution; 842var solution = workspace.CurrentSolution;
SymbolKey\SymbolKeyCrossLanguageTests.cs (1)
40var solution = workspace.CurrentSolution;
Tagging\AsynchronousTaggerTests.cs (2)
166var document = workspace.CurrentSolution.GetRequiredDocument(testDocument.Id); 221var document = workspace.CurrentSolution.GetRequiredDocument(testDocument.Id);
TextEditor\OpenDocumentTests.cs (5)
51AssertEx.SetEqual(documentIds, workspace.CurrentSolution.GetDocumentIdsWithFilePath(FilePath)); 52Assert.Equal(documentIds.Last(), workspace.CurrentSolution.GetDocument(documentIds.First()).GetLinkedDocumentIds().Single()); 53Assert.Equal(documentIds.First(), workspace.CurrentSolution.GetDocument(documentIds.Last()).GetLinkedDocumentIds().Single()); 64Assert.Same(workspace.CurrentSolution, newDocumentWithChanges.Project.Solution); 70Assert.NotSame(workspace.CurrentSolution, originalDocumentWithChanges.Project.Solution);
TextEditor\TryGetDocumentTests.cs (2)
26var document = workspace.CurrentSolution.GetDocument(workspace.GetDocumentId(hostDocument)); 54var document = workspace.CurrentSolution.GetDocument(workspace.GetDocumentId(hostDocument));
Utilities\SymbolEquivalenceComparerTests.cs (92)
51var type = (ITypeSymbol)(await workspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 123var csharpType = (ITypeSymbol)(await csharpWorkspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 124var vbType = (await vbWorkspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 193var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 194var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 195var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 196var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 244var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 245var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 246var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 247var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 283var typeC = (await workspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 284var typeD = (await workspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("D").Single(); 327var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 328var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 352var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 353var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 377var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 378var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 402var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 403var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 427var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 428var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 454var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 455var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 481var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 482var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 508var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 509var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 533var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 534var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 558var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 559var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 585var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 586var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 619var csharpType1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 620var vbType1 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 664var csharpType1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 665var vbType1 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 695var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 721var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 722var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 756var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 757var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 789var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 790var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 824var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 825var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 855var outer1 = (INamespaceSymbol)(await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").Single(); 856var outer2 = (INamespaceSymbol)(await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").Single(); 932var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 933var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 934var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 935var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 969var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 970var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 994var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 995var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1019var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1020var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1050var outer = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Outer").Single(); 1051var other = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Other").Single(); 1080var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1081var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1111var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1112var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1151var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1152var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1181var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1182var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1211var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1212var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1242var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1243var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1273var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1274var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1305var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1306var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1342var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1343var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1406var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1407var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1469var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1470var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1532var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1533var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1620var comp1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()); 1621var comp2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()); 1694var comp1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()); 1695var comp2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()); 1717var namespace1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetNamespaceMembers().Single(n => n.Name == "N").GetNamespaceMembers().Single(n => n.Name == "M"); 1718var namespace2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetNamespaceMembers().Single(n => n.Name == "N").GetNamespaceMembers().Single(n => n.Name == "M");
ValueTracking\AbstractBaseValueTrackingTests.cs (2)
29var document = testWorkspace.CurrentSolution.GetRequiredDocument(cursorDocument.Id); 39return await service.TrackValueSourceAsync(testWorkspace.CurrentSolution, item, cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (5)
InlineDiagnostics\InlineDiagnosticsTaggerProvider.cs (1)
67var project = workspace.CurrentSolution.GetProject(diagnostic.DocumentId.ProjectId);
NavigateTo\NavigateToItemProvider.cs (3)
47=> NavigateToUtilities.GetKindsProvided(_workspace.CurrentSolution); 53foreach (var project in _workspace.CurrentSolution.Projects) 112var solution = _workspace.CurrentSolution;
Peek\DefinitionPeekableItem.cs (1)
70var solution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
148workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences(analyzeReferences))
Simplification\ParameterSimplificationTests.vb (1)
18Dim solution = workspace.CurrentSolution
Microsoft.CodeAnalysis.ExternalAccess.FSharp (3)
LanguageServices\FSharpVisualStudioWorkspaceExtensions.cs (3)
24var projects = workspace.CurrentSolution.Projects.Where(p => string.Equals(p.OutputFilePath, filePath, StringComparison.OrdinalIgnoreCase)).ToList(); 44return workspace.CurrentSolution.Projects.FirstOrDefault(p => p.FilePath == filePath)?.Id ?? ProjectId.CreateNewId("ProjectNotFound"); 50return workspace.CurrentSolution.GetProject(projectId)?.FilePath;
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Options\OmniSharpSolutionAnalyzerConfigOptionsUpdater.cs (1)
23var oldSolution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
WorkspaceExtensions.cs (1)
18return workspace.CurrentSolution.GetTextDocumentAsync(identifier, cancellationToken);
Microsoft.CodeAnalysis.Features (8)
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (2)
110var newSolution = workspace.CurrentSolution.WithDocumentText( 122var 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); 38var definition = await _stackTraceExplorerService.TryFindDefinitionAsync(workspace.CurrentSolution, parsedFrame.UnderlyingObject, StackFrameSymbolPart.Method, cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
44var (project, symbol) = await TryResolveSymbolAsync(workspace.CurrentSolution, symbolKey, cancellationToken).ConfigureAwait(false);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (2)
75var metadataSolution = metadataWorkspace.CurrentSolution.WithFallbackAnalyzerOptions(sourceWorkspace.CurrentSolution.FallbackAnalyzerOptions); 344var solution = fileInfo.Workspace.CurrentSolution;
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
76solution = workspace.CurrentSolution;
RelatedDocuments\AbstractRelatedDocumentsTests.cs (1)
32var startingDocument = workspace.CurrentSolution.GetRequiredDocument(documentId);
Snippets\AbstractSnippetProviderTests.cs (2)
35var project = workspace.CurrentSolution. 118var project = workspace.CurrentSolution.
Microsoft.CodeAnalysis.Features.UnitTests (44)
EditAndContinue\ActiveStatementsMapTests.cs (3)
116var solution = workspace.CurrentSolution 171var solution = workspace.CurrentSolution 222var solution = workspace.CurrentSolution
EditAndContinue\CompileTimeSolutionProviderTests.cs (4)
41var designTimeSolution = workspace.CurrentSolution. 123_ = await workspace.CurrentSolution.GetRequiredProject(projectId).GetCompilationAsync(); 126var compileTimeSolution1 = provider.GetCompileTimeSolution(workspace.CurrentSolution); 141var compileTimeSolution2 = provider.GetCompileTimeSolution(workspace.CurrentSolution);
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
70var solution = workspace.CurrentSolution;
EditAndContinue\EmitSolutionUpdateResultsTests.cs (2)
28solution = workspace.CurrentSolution; 68var document = workspace.CurrentSolution.
EditAndContinue\RemoteEditAndContinueServiceTests.cs (5)
77await localWorkspace.ChangeSolutionAsync(localWorkspace.CurrentSolution 84var solution = localWorkspace.CurrentSolution; 140localWorkspace.CurrentSolution, 218var results = await sessionProxy.EmitSolutionUpdateAsync(localWorkspace.CurrentSolution, runningProjects: [project.Id], activeStatementSpanProvider, CancellationToken.None); 262var baseActiveSpans = await sessionProxy.GetBaseActiveStatementSpansAsync(localWorkspace.CurrentSolution, [documentId, inProcOnlyDocumentId], CancellationToken.None);
FindUsages\DefinitionItemFactoryTests.cs (29)
130var solution = workspace.CurrentSolution; 166var solution = workspace.CurrentSolution; 208var solution = workspace.CurrentSolution; 244var solution = workspace.CurrentSolution; 286var solution = workspace.CurrentSolution; 328var solution = workspace.CurrentSolution; 381var solution = workspace.CurrentSolution; 435var solution = workspace.CurrentSolution; 475var solution = workspace.CurrentSolution; 515var solution = workspace.CurrentSolution; 557var solution = workspace.CurrentSolution; 615var solution = workspace.CurrentSolution; 661var solution = workspace.CurrentSolution; 698var solution = workspace.CurrentSolution; 760var solution = workspace.CurrentSolution; 816var solution = workspace.CurrentSolution; 870var solution = workspace.CurrentSolution; 925var solution = workspace.CurrentSolution; 975var solution = workspace.CurrentSolution; 1030var solution = workspace.CurrentSolution; 1082var solution = workspace.CurrentSolution; 1144var solution = workspace.CurrentSolution; 1201var solution = workspace.CurrentSolution; 1258var solution = workspace.CurrentSolution; 1330var solution = workspace.CurrentSolution; 1390var solution = workspace.CurrentSolution; 1442var solution = workspace.CurrentSolution; 1505var solution = workspace.CurrentSolution; 1576var 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. 69if (CurrentSolution.ContainsDocument(documentId)) 73else if (CurrentSolution.ContainsAdditionalDocument(documentId)) 86if (CurrentSolution.ContainsDocument(documentId)) 90else if (CurrentSolution.ContainsAdditionalDocument(documentId)) 103var textDocument = w.CurrentSolution.GetDocument(documentId) ?? w.CurrentSolution.GetAdditionalDocument(documentId);
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Workspaces\LspWorkspaceManager.cs (3)
147foreach (var documentId in workspace.CurrentSolution.GetDocumentIds(uri)) 355var workspaceCurrentSolution = workspace.CurrentSolution; 393workspaceCurrentSolution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (19)
Metadata\LspMetadataAsSourceWorkspaceTests.cs (1)
131var doc = testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.CurrentSolution.Projects.SingleOrDefault()?.Documents.SingleOrDefault();
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
337return testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.CurrentSolution.Projects.SingleOrDefault()?.Documents.SingleOrDefault(); 342return testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.CurrentSolution.Projects.SingleOrDefault()?.AdditionalDocuments.SingleOrDefault();
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (13)
49Assert.Empty(workspace.CurrentSolution.FallbackAnalyzerOptions); 71Assert.Empty(workspace.CurrentSolution.FallbackAnalyzerOptions); 78Assert.False(workspace.CurrentSolution.FallbackAnalyzerOptions.TryGetValue(LanguageNames.CSharp, out _)); 98Assert.True(workspace.CurrentSolution.FallbackAnalyzerOptions.TryGetValue(language, out var fallbackOptions)); 110Assert.Empty(workspace.CurrentSolution.Projects); 147Assert.False(workspace.CurrentSolution.FallbackAnalyzerOptions.TryGetValue(LanguageNames.CSharp, out _)); 153Assert.True(workspace.CurrentSolution.FallbackAnalyzerOptions.TryGetValue(LanguageNames.CSharp, out var fallbackOptions)); 166Assert.True(workspace.CurrentSolution.FallbackAnalyzerOptions.TryGetValue(LanguageNames.CSharp, out fallbackOptions)); 171var projectWithConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithConfig.Id); 210var projectWithoutConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithoutConfig.Id); 277Assert.Empty(workspace.CurrentSolution.FallbackAnalyzerOptions); 282var optionsAfterProjectAdded = workspace.CurrentSolution.FallbackAnalyzerOptions; 289Assert.Same(optionsAfterProjectAdded, workspace.CurrentSolution.FallbackAnalyzerOptions);
Workspaces\LspWorkspaceManagerTests.cs (3)
445var newProjectWorkspaceTwo = testWorkspaceTwo.CurrentSolution.Projects.First().WithAssemblyName("NewCSProj1"); 482var documentUri = testWorkspace.CurrentSolution.Projects.First().Documents.First().GetURI(); 501var newProject = testWorkspace.CurrentSolution.Projects.First().WithAssemblyName(newAssemblyName);
Microsoft.CodeAnalysis.Remote.ServiceHub (8)
Host\RemoteWorkspace.cs (4)
51var currentSolutionChecksum = await this.CurrentSolution.CompilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false); 211var 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)
625await TestUtils.AssertChecksumsAsync(_assetProvider, checksumFromRequest, workspace.CurrentSolution, incrementalSolutionBuilt, projectConeId).ConfigureAwait(false);
Host\RemoteWorkspace_SolutionCaching.cs (1)
128solutions.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)
122var document = workspace.CurrentSolution.GetDocument(documentId);
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (6)
CaseCorrection\VisualBasicCaseCorrectionTestBase.vb (1)
16Dim project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.VisualBasic)
Formatting\FormattingTests.vb (2)
3015Dim project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.VisualBasic) 4197Dim solution = New AdhocWorkspace().CurrentSolution
Formatting\VisualBasicFormattingTestBase.vb (1)
57Dim project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.VisualBasic)
OrganizeImports\OrganizeImportsTests.vb (2)
27Dim project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.VisualBasic) 48Dim project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.VisualBasic)
Microsoft.CodeAnalysis.Workspaces (42)
CodeActions\CodeAction.cs (1)
463originalSolution ??= changedSolution.Workspace.CurrentSolution;
CodeActions\Operations\ApplyChangesOperation.cs (1)
53var currentSolution = workspace.CurrentSolution;
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (1)
122var solution = _workspace.CurrentSolution;
Formatting\Formatter.cs (1)
321return syntaxFormattingService.GetFormattingOptions(optionSet ?? workspace.CurrentSolution.Options);
Recommendations\Recommender.cs (1)
26var solution = workspace.CurrentSolution;
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (3)
286if (_documentAlreadyInWorkspace(_project._projectSystemProjectFactory.Workspace.CurrentSolution, documentId)) 338if (_project._projectSystemProjectFactory.Workspace.CurrentSolution.GetDocument(documentId) != null) 484var attributes = w.CurrentSolution.GetRequiredDocument(documentId).State.Attributes;
Workspace\ProjectSystem\ProjectSystemProject.cs (7)
290TryReportCompilationThrownAway(_projectSystemProjectFactory.Workspace.CurrentSolution, Id); 520private bool HasBeenRemoved => !_projectSystemProjectFactory.Workspace.CurrentSolution.ContainsProject(Id); 1357return _projectSystemProjectFactory.Workspace.CurrentSolution.GetRequiredProject(Id).AllProjectReferences.Contains(projectReference); 1365var projectReferencesInWorkspace = _projectSystemProjectFactory.Workspace.CurrentSolution.GetRequiredProject(Id).AllProjectReferences; 1404if (!_projectSystemProjectFactory.Workspace.CurrentSolution.ContainsProject(Id)) 1431var project = w.CurrentSolution.GetRequiredProject(Id); 1439if (w.CurrentSolution.ProjectIds.Count == 1)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (2)
154analyzerReferences: w.CurrentSolution.AnalyzerReferences).WithTelemetryId(SolutionTelemetryId); 390project = Workspace.CurrentSolution.GetRequiredProject(projectId);
Workspace\TextExtensions.cs (4)
26var solution = workspace.CurrentSolution; 62var solution = workspace.CurrentSolution; 109var solution = workspace.CurrentSolution; 130return 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 187var 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"/>. 564return 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"/>. 228return CurrentSolution.GetRelatedDocumentIds(documentId);
Workspace\Workspace_Events.cs (1)
270var currentSolution = this.CurrentSolution;
Microsoft.CodeAnalysis.Workspaces.MSBuild (12)
MSBuild\MSBuildWorkspace.cs (11)
213return this.CurrentSolution; 252var projectMap = ProjectMap.Create(this.CurrentSolution); 263var projectResult = this.CurrentSolution.GetProject(projects[0].Id); 389var document = this.CurrentSolution.GetDocument(documentId); 407var document = this.CurrentSolution.GetAdditionalDocument(documentId); 455var project = this.CurrentSolution.GetRequiredProject(info.Id.ProjectId); 515var document = this.CurrentSolution.GetDocument(documentId); 599var relativePath = PathUtilities.GetRelativePath(Path.GetDirectoryName(CurrentSolution.GetRequiredProject(projectId).FilePath)!, peRef.FilePath); 629var project = this.CurrentSolution.GetProject(projectId); 654var project = this.CurrentSolution.GetProject(projectReference.ProjectId); 669var 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)
88Assert.Single(workspace.CurrentSolution.ProjectIds); 113Assert.Single(workspace.CurrentSolution.ProjectIds); 124Assert.Equal(2, workspace.CurrentSolution.ProjectIds.Count); 131Assert.Equal(libraryProject.FilePath, workspace.CurrentSolution.GetProject(projectRefId).FilePath); 153Assert.Equal(2, workspace.CurrentSolution.ProjectIds.Count); 164Assert.Equal(3, workspace.CurrentSolution.ProjectIds.Count); 196Assert.Equal(3, workspace.CurrentSolution.ProjectIds.Count); 201foreach (var project in workspace.CurrentSolution.Projects) 214foreach (var project in workspace.CurrentSolution.Projects) 238Assert.Equal(3, workspace.CurrentSolution.ProjectIds.Count); 242foreach (var project in workspace.CurrentSolution.Projects) 286Assert.Equal(4, workspace.CurrentSolution.ProjectIds.Count); 291foreach (var project in workspace.CurrentSolution.Projects) 313foreach (var project in workspace.CurrentSolution.Projects) 349var projects = workspace.CurrentSolution.Projects.Where(p => p.FilePath.EndsWith("Project.csproj")); 354var referencedProject = workspace.CurrentSolution.GetProject(projectReference.ProjectId); 443Assert.Equal(2, workspace.CurrentSolution.ProjectIds.Count); 445Assert.Contains(workspace.CurrentSolution.Projects, p => p.Name == "Library(net6)"); 446Assert.Contains(workspace.CurrentSolution.Projects, p => p.Name == "Library(net5)"); 501Assert.Equal(2, workspace.CurrentSolution.ProjectIds.Count);
VisualStudioMSBuildWorkspaceTests.cs (27)
1433vbProject = workspace.CurrentSolution.GetProject(vbProject.Id); 2003var solution2 = workspace.CurrentSolution; 2023var projectB = workspaceB.CurrentSolution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2046var solution2 = workspace.CurrentSolution; 2079var solution2 = workspace.CurrentSolution; 2108var solution2 = workspace.CurrentSolution; 2135var solution2 = workspace.CurrentSolution; 2161var solution2 = workspace.CurrentSolution; 2191workspace.TryApplyChanges(workspace.CurrentSolution.AddAdditionalDocument(DocumentId.CreateNewId(csProjectId), "foo.xaml", SourceText.From("<foo></foo>"))); 2194var xaml = workspace.CurrentSolution.GetProject(csProjectId).AdditionalDocuments.FirstOrDefault(d => d.Name == "XamlFile.xaml"); 2201workspace.TryApplyChanges(workspace.CurrentSolution.RemoveAdditionalDocument(xaml.Id)); 2214var originalSolution = workspace.CurrentSolution; 2223var doc = workspace.CurrentSolution.Projects.First().Documents.First(); 2227workspace.TryApplyChanges(workspace.CurrentSolution.WithDocumentText(doc.Id, SourceText.From(newText), PreservationMode.PreserveIdentity)); 2244var originalSolution = workspace.CurrentSolution; 2253var doc = workspace.CurrentSolution.Projects.First().Documents.First(); 2259.CurrentSolution 2289Assert.Equal(2, workspace.CurrentSolution.Projects.Count()); 2319Assert.Equal(2, workspace.CurrentSolution.Projects.Count()); 2572var csproject = workspace.CurrentSolution.Projects.First(p => p.Language == LanguageNames.CSharp); 2580var vbproject = workspace.CurrentSolution.Projects.First(p => p.Language == LanguageNames.VisualBasic); 2931workspace.TryApplyChanges(workspace.CurrentSolution.GetProject(project.Id).RemoveAnalyzerReference(aref).Solution); 2952workspace.TryApplyChanges(workspace.CurrentSolution.GetProject(project.Id).RemoveProjectReference(pref).Solution); 2953Assert.Empty(workspace.CurrentSolution.GetProject(project.Id).ProjectReferences); 2959workspace.TryApplyChanges(workspace.CurrentSolution.GetProject(project.Id).AddProjectReference(pref).Solution); 2960Assert.Single(workspace.CurrentSolution.GetProject(project.Id).ProjectReferences); 3276Assert.Equal(0, workspace.CurrentSolution.ProjectIds.Count);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (11)
Formatting\FormattingTestBase.cs (1)
43var project = workspace.CurrentSolution.AddProject("Project", "Project.dll", language);
WorkspaceExtensions.cs (3)
18var oldSolution = workspace.CurrentSolution; 26var oldSolution = workspace.CurrentSolution; 33var oldSolution = workspace.CurrentSolution;
Workspaces\TestHostDocument.cs (1)
42var project = workspace.CurrentSolution.GetRequiredProject(_project!.Id);
Workspaces\TestWorkspace`1.cs (6)
514var document = await CurrentSolution.GetSourceGeneratedDocumentAsync(documentId, CancellationToken.None); 521return ChangeDocumentAsync(documentId, this.CurrentSolution.WithDocumentText(documentId, text)); 535var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.CurrentSolution.AddDocument(documentInfo)); 542var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.CurrentSolution.WithAdditionalDocumentText(documentId, text)); 549var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.CurrentSolution.WithAnalyzerConfigDocumentText(documentId, text)); 778SerializerService.TestAccessor.AddAnalyzerImageReferences(this.CurrentSolution.AnalyzerReferences);
Microsoft.CodeAnalysis.Workspaces.UnitTests (343)
CodeCleanup\AddMissingTokensTests.cs (1)
2728var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\CodeCleanupTests.cs (1)
416var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\FixIncorrectTokenTests.cs (1)
753var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\NormalizeModifiersOrOperatorsTests.cs (1)
1029var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\ReduceTokenTests.cs (1)
2016var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\RemoveUnnecessaryLineContinuationTests.cs (1)
1452var solution = new AdhocWorkspace().CurrentSolution;
CommandLineProject\CommandLineProjectWorkspaceTests.cs (2)
30var project = ws.CurrentSolution.GetProject(info.Id); 58var project = ws.CurrentSolution.GetProject(info.Id);
FindAllDeclarationsTests.cs (3)
133var solution = workspace.CurrentSolution; 156var solution = workspace.CurrentSolution; 699var solution = workspace.CurrentSolution
FindAllDeclarationsTests.TestSolutionsAndProject.cs (2)
94solution = workspace.CurrentSolution 109solution = workspace.CurrentSolution;
FindReferencesTests.cs (8)
63return workspace.CurrentSolution 73var solution = workspace.CurrentSolution 122var solution = workspace.CurrentSolution 172var sln = CreateWorkspace().CurrentSolution 211var sln = CreateWorkspace().CurrentSolution 275var sln = CreateWorkspace().CurrentSolution 363var solution = CreateWorkspace().CurrentSolution; 453var solution = CreateWorkspace().CurrentSolution;
Formatter\FormatterTests.cs (3)
72var solutionOptions = workspace.CurrentSolution.Options. 126var updatedSolutionOptions = OptionsTestHelpers.GetOptionSetWithChangedOptions(workspace.CurrentSolution.Options, OptionsTestHelpers.PublicFormattingOptionsWithNonDefaultValues); 127var solutionWithUpdatedOptions = workspace.CurrentSolution.WithOptions(updatedSolutionOptions);
GeneratedCodeRecognitionTests.cs (1)
101return new AdhocWorkspace().CurrentSolution
LinkedFileDiffMerging\LinkedFileDiffMergingTests.cs (1)
20var solution = workspace.CurrentSolution;
SemanticModelReuse\SemanticModelReuseTests.cs (1)
25var solution = new AdhocWorkspace().CurrentSolution;
Simplifier\SimplifierTests.cs (2)
81var updatedOptions = GetOptionSetWithChangedPublicOptions(workspace.CurrentSolution.Options); 90var solutionWithUpdatedOptions = workspace.CurrentSolution.WithOptions(updatedOptions);
SolutionTests\ProjectDependencyGraphTests.cs (1)
738=> new AdhocWorkspace().CurrentSolution;
SolutionTests\ProjectSemanticVersionTests.cs (18)
22var project = AddEmptyProject(workspace.CurrentSolution); 31var project = AddEmptyProject(workspace.CurrentSolution) 41var document = AddEmptyProject(workspace.CurrentSolution) 55var document = AddEmptyProject(workspace.CurrentSolution) 69var document = AddEmptyProject(workspace.CurrentSolution) 83var document = AddEmptyProject(workspace.CurrentSolution) 97var document = AddEmptyProject(workspace.CurrentSolution) 111var document = AddEmptyProject(workspace.CurrentSolution) 125var document = AddEmptyProject(workspace.CurrentSolution) 139var document = AddEmptyProject(workspace.CurrentSolution) 153var document = AddEmptyProject(workspace.CurrentSolution, LanguageNames.VisualBasic) 167var document = AddEmptyProject(workspace.CurrentSolution, LanguageNames.VisualBasic) 181var document = AddEmptyProject(workspace.CurrentSolution, LanguageNames.VisualBasic) 195var document = AddEmptyProject(workspace.CurrentSolution, LanguageNames.VisualBasic) 209var document = AddEmptyProject(workspace.CurrentSolution, LanguageNames.VisualBasic) 223var document = AddEmptyProject(workspace.CurrentSolution, LanguageNames.VisualBasic) 237var document = AddEmptyProject(workspace.CurrentSolution, LanguageNames.VisualBasic) 251var document = AddEmptyProject(workspace.CurrentSolution, LanguageNames.VisualBasic)
SolutionTests\SolutionTests.cs (181)
56Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution 78Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution 115var solution = workspace.CurrentSolution; 124var solution = workspace.CurrentSolution; 134var solution = workspace.CurrentSolution; 143var solution = workspace.CurrentSolution; 153var solution = workspace.CurrentSolution; 162var solution = workspace.CurrentSolution; 172var solution = workspace.CurrentSolution; 192var solution = workspace.CurrentSolution; 223var solution = workspace.CurrentSolution; 250var solution = workspace.CurrentSolution; 269var solution = workspace.CurrentSolution; 288var solution = workspace.CurrentSolution; 299var solution = workspace.CurrentSolution; 329var solution = workspace.CurrentSolution 345var solution = workspace.CurrentSolution; 370var solution = workspace.CurrentSolution; 394var solution = workspace.CurrentSolution; 427var solution = workspace.CurrentSolution; 474solution = workspace.CurrentSolution; 515var solution = workspace.CurrentSolution; 562solution = workspace.CurrentSolution; 594var solution = workspace.CurrentSolution; 648solution = workspace.CurrentSolution; 680var solution = workspace.CurrentSolution; 728solution = workspace.CurrentSolution; 757var solution = workspace.CurrentSolution; 804solution = workspace.CurrentSolution; 839Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution 845var solution = workspace.CurrentSolution; 893solution = workspace.CurrentSolution; 916var solution = workspace.CurrentSolution; 938var solution = workspace.CurrentSolution; 962var solution = workspace.CurrentSolution; 984var solution = workspace.CurrentSolution; 1008var solution = workspace.CurrentSolution; 1030var solution = workspace.CurrentSolution; 1052var solution = workspace.CurrentSolution; 1088var solution = workspace.CurrentSolution 1297var solution = workspace.CurrentSolution 1332var solution = workspace.CurrentSolution 1367var solution = workspace.CurrentSolution 1402var solution = workspace.CurrentSolution 1436var solution = workspace.CurrentSolution 1458var solution = workspace.CurrentSolution 1486var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp); 1513var solution = workspace.CurrentSolution 1536var solution = workspace.CurrentSolution 1559var solution = workspace.CurrentSolution. 1582var solution = workspace.CurrentSolution. 1619var solution = workspace.CurrentSolution 1673var solution = workspace.CurrentSolution 1696var solution = workspace.CurrentSolution 1719var solution = workspace.CurrentSolution 1736var solution = workspace.CurrentSolution 1761var solution = workspace.CurrentSolution 1785var document = workspace.CurrentSolution 1819var document = workspace.CurrentSolution 1857var document = workspace.CurrentSolution 1876var document = workspace.CurrentSolution 1895var document = workspace.CurrentSolution 1911var solution = workspace.CurrentSolution; 1944var solution = workspace.CurrentSolution; 1960var solution = workspace.CurrentSolution; 2002var solution = workspace.CurrentSolution; 2037var solution = workspace.CurrentSolution; 2073var solution = workspace.CurrentSolution; 2091var solution = workspace.CurrentSolution; 2116var solution = workspace.CurrentSolution; 2143var solution = workspace.CurrentSolution; 2161var solution = workspace.CurrentSolution; 2189var solution = workspace.CurrentSolution; 2216var solution = workspace.CurrentSolution; 2230var solution = workspace.CurrentSolution; 2256var solution = workspace.CurrentSolution; 2283var solution = workspace.CurrentSolution; 2302TestOptionValues(workspace.CurrentSolution, expectedA: "A", hasBWithoutFallback: false, expectedB: "fallbackY", expectedBFile: "fallbackY"); 2359var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2385var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2415var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2444var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2473var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2504var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2527var solution = workspace.CurrentSolution; 2540var solution = workspace.CurrentSolution; 2552var solution = workspace.CurrentSolution; 2567var solution = workspace.CurrentSolution 2613var solution = workspace.CurrentSolution 2637var solution = workspace.CurrentSolution 2665var solution = workspace.CurrentSolution 2675var solution = workspace.CurrentSolution; 2689var solution = workspace.CurrentSolution 2710var solution = workspace.CurrentSolution 2731var solution = workspace.CurrentSolution 2750var solution = workspace.CurrentSolution 2769var solution = workspace.CurrentSolution 2784var solution = workspace.CurrentSolution 2803var solution = workspace.CurrentSolution 2820var solution = workspace.CurrentSolution 2923var solution = workspace.CurrentSolution; 2944var solution = workspace.CurrentSolution; 2982var solution = workspace.CurrentSolution; 3040var solution = workspace.CurrentSolution; 3058var sol = workspace.CurrentSolution; 3077var sol = workspace.CurrentSolution; 3103var sol = workspace.CurrentSolution; 3139var sol = workspace.CurrentSolution 3160var solution1 = workspace.CurrentSolution 3183var sol = workspace.CurrentSolution 3224var sol = workspace.CurrentSolution 3265var solution = workspace.CurrentSolution 3296var sol = workspace.CurrentSolution; 3327var sol = workspace.CurrentSolution 3349var sol = workspace.CurrentSolution 3370var sol = workspace.CurrentSolution 3394var sol = workspace.CurrentSolution 3416var sol = workspace.CurrentSolution 3437var sol = workspace.CurrentSolution 3457var sol = workspace.CurrentSolution 3477var sol = workspace.CurrentSolution 3497var sol = workspace.CurrentSolution 3516var sol = workspace.CurrentSolution 3547var sol = workspace.CurrentSolution 3579var sol = workspace.CurrentSolution 3605var sol = workspace.CurrentSolution 3639var sol = workspace.CurrentSolution 3669var sol = workspace.CurrentSolution 3720var sol = workspace.CurrentSolution 3745var sol = workspace.CurrentSolution 3772var sol = workspace.CurrentSolution 3906var solution = workspace.CurrentSolution; 3959var solution = new AdhocWorkspace().CurrentSolution 4085var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4110var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4138var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4183var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4265var project = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4283var project = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4299var originalProject = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4323var originalProject = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4351var document = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4367var solution = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp).Solution; 4423var currentSolution = workspace.CurrentSolution; 4563var solution = workspace.CurrentSolution; 4579var solution = workspace.CurrentSolution; 4650var solution = workspace.CurrentSolution; 4687var solution = workspace.CurrentSolution; 4723var solution = workspace.CurrentSolution; 4764var solution = workspace.CurrentSolution; 4810var solution = workspace.CurrentSolution; 4841var solution = workspace.CurrentSolution; 4951var solution = workspace.CurrentSolution; 4974var solution = workspace.CurrentSolution; 4996var solution = workspace.CurrentSolution; 5024var solution = workspace.CurrentSolution; 5052var solution = workspace.CurrentSolution; 5081var solution = workspace.CurrentSolution; 5112var solution = workspace.CurrentSolution; 5150var solution = workspace.CurrentSolution; 5167var solution = workspace.CurrentSolution; 5213var solution = workspace.CurrentSolution; 5257var solution = workspace.CurrentSolution; 5281var solution = workspace.CurrentSolution; 5419var s0 = workspace.CurrentSolution; 5465var solution = workspace.CurrentSolution.AddProject(projInfo); 5494var solution = workspace.CurrentSolution; 5548var solution = workspace.CurrentSolution 5576var solution = workspace.CurrentSolution 5596var solution = workspace.CurrentSolution 5610var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 5627var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 5647var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5675var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5705var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5738var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5763var project1 = workspace.CurrentSolution 5815var project = workspace.CurrentSolution.AddProject("TypeScript", "TypeScript", "TypeScript"); 5836var project1 = workspace.CurrentSolution 5869var document1 = workspace.CurrentSolution.GetRequiredDocument(documentId1); 5875var document2 = workspace.CurrentSolution.GetRequiredDocument(documentId2);
SolutionTests\SolutionWithSourceGeneratorTests.cs (48)
48var project = AddEmptyProject(workspace.CurrentSolution) 89var project = AddEmptyProject(workspace.CurrentSolution) 137var project = AddEmptyProject(workspace.CurrentSolution) 164var project = AddEmptyProject(workspace.CurrentSolution) 253var project = AddEmptyProject(workspace.CurrentSolution) 293var project = AddEmptyProject(workspace.CurrentSolution) 337var project = AddEmptyProject(workspace.CurrentSolution) 365var projectBeforeChange = AddEmptyProject(workspace.CurrentSolution) 388var solutionWithProjects = AddProjectWithReference(workspace.CurrentSolution, analyzerReference); 418var solution = AddEmptyProject(workspace.CurrentSolution) 443var project = AddEmptyProject(workspace.CurrentSolution) 457var project = AddEmptyProject(workspace.CurrentSolution) 480var project = AddEmptyProject(workspace.CurrentSolution) 500var project = AddEmptyProject(workspace.CurrentSolution) 527var project = AddEmptyProject(workspace.CurrentSolution) 575var project = AddEmptyProject(workspace.CurrentSolution); 588var project = AddEmptyProject(workspace.CurrentSolution) 600Assert.NotSame(workspace.CurrentSolution, generatedDocument.Project.Solution); 612var project = AddEmptyProject(workspace.CurrentSolution) 617var generatedDocument = Assert.Single(await workspace.CurrentSolution.Projects.Single().GetSourceGeneratedDocumentsAsync()); 623Assert.Same(workspace.CurrentSolution, generatedDocument!.Project.Solution); 631var originalAdditionalFile = AddEmptyProject(workspace.CurrentSolution) 644Assert.Empty(await workspace.CurrentSolution.Projects.Single().GetSourceGeneratedDocumentsAsync()); 659var solution = AddEmptyProject(workspace.CurrentSolution) 668var generatedDocument = Assert.Single(await workspace.CurrentSolution.GetRequiredProject(projectIdWithGenerator).GetSourceGeneratedDocumentsAsync()); 690var project = AddEmptyProject(workspace.CurrentSolution) 702var document = await workspace.CurrentSolution.GetSourceGeneratedDocumentAsync(generatedDocument.Identity.DocumentId, CancellationToken.None); 718var project = AddEmptyProject(workspace.CurrentSolution) 724var documentToFreeze = workspace.CurrentSolution.Projects.Single().Documents.Single(); 749var project = AddEmptyProject(workspace.CurrentSolution) 778var project = AddEmptyProject(workspace.CurrentSolution) 808var originalDocument1 = AddEmptyProject(workspace.CurrentSolution, name: "Project1") 846var project = AddEmptyProject(workspace.CurrentSolution); 870var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference); 903var solution = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference).Solution; 928var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference); 948var project0 = AddEmptyProject(workspace.CurrentSolution); 984var project = AddEmptyProject(workspace.CurrentSolution) 1016var project = AddEmptyProject(workspace.CurrentSolution) 1046var project = AddEmptyProject(workspace.CurrentSolution) 1074var project = AddEmptyProject(workspace.CurrentSolution) 1101var project = AddEmptyProject(workspace.CurrentSolution) 1129var project = AddEmptyProject(workspace.CurrentSolution) 1162var project = AddEmptyProject(workspace.CurrentSolution) 1217var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference); 1252var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference); 1289var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference); 1320var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference);
SolutionTests\SourceGeneratorTelemetryCollectorWorkspaceServiceTests.cs (1)
31var project = AddEmptyProject(workspace.CurrentSolution)
SolutionTests\TryApplyChangesTests.cs (7)
77var project = workspace.CurrentSolution.Projects.Single(); 90var project = workspace.CurrentSolution.Projects.Single(); 103var project = workspace.CurrentSolution.Projects.Single(); 120var project = workspace.CurrentSolution.Projects.Single(); 135var project = workspace.CurrentSolution.Projects.Single(); 150var project = workspace.CurrentSolution.Projects.Single(); 164var project = workspace.CurrentSolution.Projects.Single();
SymbolKeyTests.cs (2)
877document = workspace.CurrentSolution.GetDocument(document.Id); 924document = workspace.CurrentSolution.GetDocument(document.Id);
SyntaxNodeTests.cs (1)
87var sol = new AdhocWorkspace().CurrentSolution
SyntaxReferenceTests.cs (6)
49var solution = AddSingleFileCSharpProject(workspace.CurrentSolution, @" 72var solution = AddSingleFileVisualBasicProject(workspace.CurrentSolution, @" 94var solution = AddSingleFileCSharpProject(workspace.CurrentSolution, @" 117var solution = AddSingleFileVisualBasicProject(workspace.CurrentSolution, @" 140var solution = AddSingleFileCSharpProject(workspace.CurrentSolution, @" 168var solution = AddSingleFileVisualBasicProject(workspace.CurrentSolution, @"
WorkspaceServiceTests\GlobalOptionServiceTests.cs (15)
72var newSolution1 = workspace1.CurrentSolution.WithOptions(newSet); 77var oldSolution2 = workspace2.CurrentSolution; 83var newSolution2 = workspace2.CurrentSolution; 103var newSolution1 = workspace1.CurrentSolution.WithOptions(newSet); 107var oldSolution2 = workspace2.CurrentSolution; 112Assert.Equal("EOLN", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 113Assert.Equal("EOLN", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 119Assert.Equal("EOLN", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 120Assert.Equal("EOLN", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 127Assert.Equal("NEW_LINE", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 128Assert.Equal("NEW_LINE", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 133Assert.Equal("NEW_LINE", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 134Assert.Equal("NEW_LINE", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 138Assert.Equal("NEW_LINE2", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 139Assert.Equal("NEW_LINE2", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey));
WorkspaceTests\AdhocWorkspaceTests.cs (30)
37Assert.Equal(project, ws.CurrentSolution.Projects.FirstOrDefault()); 49Assert.Same(project, ws.CurrentSolution.Projects.FirstOrDefault()); 62Assert.Equal(ws.CurrentSolution.GetDocument(info.Id), doc); 94Assert.Same(ws.CurrentSolution, solution); 128var solution = ws.CurrentSolution; 165var newSolution = ws.CurrentSolution.AddProject(projInfo); 167Assert.Equal(0, ws.CurrentSolution.Projects.Count()); 172Assert.Equal(1, ws.CurrentSolution.Projects.Count()); 173var proj = ws.CurrentSolution.Projects.First(); 198Assert.Equal(1, ws.CurrentSolution.Projects.Count()); 200var newSolution = ws.CurrentSolution.RemoveProject(pid); 206Assert.Equal(0, ws.CurrentSolution.Projects.Count()); 226var doc = ws.CurrentSolution.GetDocument(docInfo.Id); 231doc = ws.CurrentSolution.GetDocument(docInfo.Id); 239doc = ws.CurrentSolution.GetDocument(docInfo.Id); 260var doc = ws.CurrentSolution.GetAdditionalDocument(docInfo.Id); 265doc = ws.CurrentSolution.GetAdditionalDocument(docInfo.Id); 273doc = ws.CurrentSolution.GetAdditionalDocument(docInfo.Id); 299var doc = ws.CurrentSolution.GetAnalyzerConfigDocument(docInfo.Id); 304doc = ws.CurrentSolution.GetAnalyzerConfigDocument(docInfo.Id); 312doc = ws.CurrentSolution.GetAnalyzerConfigDocument(docInfo.Id); 333var doc = ws.CurrentSolution.GetDocument(docInfo.Id); 381var pws = new WorkspaceWithPartialSemantics(ws.CurrentSolution); 382var proj = pws.CurrentSolution.GetProject(projid); 390var frozen = pws.CurrentSolution.GetDocument(docid1).WithFrozenPartialSemantics(CancellationToken.None); 434var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id); 467var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id); 501var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id); 532var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id); 562var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id);
WorkspaceTests\WorkspaceTests.cs (4)
106var newSolution = ws.CurrentSolution.WithAnalyzerReferences([new TestAnalyzerReference()]); 144return this.CurrentSolution.GetProject(projectInfo.Id); 182return this.CurrentSolution.GetDocument(documentInfo.Id); 190var solution = workspace1.CurrentSolution;
Microsoft.VisualStudio.LanguageServices (88)
CallHierarchy\CallHierarchyDetail.cs (2)
31_documentId = workspace.CurrentSolution.GetDocumentId(location.SourceTree); 69var solution = _workspace.CurrentSolution;
CallHierarchy\Finders\AbstractCallFinder.cs (1)
94var project = workspace.CurrentSolution.GetProject(_projectId);
CodeLens\CodeLensCallbackListener.cs (4)
69var solution = _workspace.CurrentSolution; 89var solution = _workspace.CurrentSolution; 121var solution = _workspace.CurrentSolution; 160var solution = _workspace.CurrentSolution;
DesignerAttribute\VisualStudioDesignerAttributeService.cs (1)
119var solution = _workspace.CurrentSolution;
Diagnostics\VisualStudioVenusSpanMappingService.cs (1)
87var solution = _workspace.CurrentSolution;
EditorConfigSettings\SettingsEditorControl.xaml.cs (1)
83var solution = _workspace.CurrentSolution;
EditorConfigSettings\SettingsEditorFactory.cs (2)
64if (!workspace.CurrentSolution.Projects.Any(p => p.Language is LanguageNames.CSharp or LanguageNames.VisualBasic)) 71if (!workspace.CurrentSolution.Projects.Any(p => p.AnalyzerConfigDocuments.Any(editorconfig => StringComparer.OrdinalIgnoreCase.Equals(editorconfig.FilePath, filePath))))
Extensions\VisualStudioWorkspaceImplExtensions.cs (1)
70var document = workspace.CurrentSolution.GetDocument(id);
Implementation\HierarchyItemToProjectIdMap.cs (1)
37var candidateProjects = _workspace.CurrentSolution.Projects
Implementation\VisualStudioSupportsFeatureService.cs (1)
59return SupportsRenameWorker(workspace.CurrentSolution.GetRelatedDocumentIds(documentId));
Implementation\VsRefactorNotifyService.cs (1)
183var document = visualStudioWorkspace.CurrentSolution.GetDocument(documentId);
InheritanceMargin\MarginGlyph\InheritanceMarginContextMenu.xaml.cs (1)
68var 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)
86else if (Workspace.CurrentSolution.GetProject(projectId) is Project project)
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (1)
193var solution = _languageService.Workspace.CurrentSolution;
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (4)
185=> this.Workspace.CurrentSolution.GetProject(projectId); 309this.Workspace.CurrentSolution, _languageName, CancellationToken.None).ConfigureAwait(true); 320return new ObjectList(ObjectListKind.Projects, flags, this, this.GetProjectListItems(this.Workspace.CurrentSolution, _languageName, flags)); 481var project = this.Workspace.CurrentSolution.GetProject(symbolListItem.ProjectId);
Library\ObjectBrowser\ObjectList.cs (3)
681var project = this.LibraryManager.Workspace.CurrentSolution.GetProject(symbolListItem.ProjectId); 751var project = this.LibraryManager.Workspace.CurrentSolution.GetProject(symbolItem.ProjectId); 909var project = this.LibraryManager.Workspace.CurrentSolution.GetProject(projectListItem.ProjectId);
Library\ObjectBrowser\ObjectListItem.cs (1)
75var project = workspace.CurrentSolution.GetProject(ProjectId);
Packaging\PackageInstallerServiceFactory.cs (1)
481var solution = Workspace.CurrentSolution;
Progression\GraphQueryManager.cs (2)
60var solution = _workspace.CurrentSolution; 101var solution = _workspace.CurrentSolution;
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
97foreach (var projectId in Workspace.CurrentSolution.ProjectIds)
ProjectSystem\VisualStudioWorkspace.cs (1)
48=> CurrentSolution.GetTextDocument(documentId)?.FilePath;
ProjectSystem\VisualStudioWorkspaceImpl.AbstractAddDocumentUndoUnit.cs (1)
30var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.AbstractRemoveDocumentUndoUnit.cs (2)
32var currentSolution = Workspace.CurrentSolution; 45var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
31var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.AddProjectReferenceUndoUnit.cs (2)
28var currentSolution = Workspace.CurrentSolution; 43var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.cs (13)
297var document = _threadingContext.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask()); 322var currentSolution = this.CurrentSolution; 495var originalProject = CurrentSolution.GetRequiredProject(projectId); 513var parseOptionsService = CurrentSolution.GetRequiredProject(projectId).Services.GetRequiredService<IParseOptionsChangingService>(); 916if (CurrentSolution.FilePath is null || documentInfo.FilePath is null) 925var solutionDirectory = PathUtilities.GetDirectoryName(this.CurrentSolution.FilePath); 931if (PathUtilities.GetDirectoryName(CurrentSolution.GetProject(documentInfo.Id.ProjectId)?.FilePath) == solutionDirectory) 1009var document = this.CurrentSolution.GetTextDocument(documentId); 1090var document = this.CurrentSolution.GetTextDocument(documentId); 1205var textBuffer = this.CurrentSolution.GetTextDocument(documentId)!.GetTextSynchronously(CancellationToken.None).Container.TryGetTextBuffer(); 1222var document = CurrentSolution.GetRequiredDocument(documentId); 1316return CurrentSolution.GetRequiredProject(documentId.ProjectId).Language switch 1615uiContext.IsActive = this.CurrentSolution.Projects.Any(p => p.Language == language);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (7)
165if (workspace.CurrentSolution.ContainsDocument(documentId)) 169else if (workspace.CurrentSolution.ContainsAdditionalDocument(documentId)) 175Debug.Assert(workspace.CurrentSolution.ContainsAnalyzerConfigDocument(documentId)); 208var solution = _workspace.CurrentSolution; 275var documentIds = _workspace.CurrentSolution.GetDocumentIdsWithFilePath(moniker); 317var documentIds = w.CurrentSolution.GetDocumentIdsWithFilePath(moniker); 327var solution = w.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.RemoveMetadataReferenceUndoUnit.cs (1)
30var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.RemoveProjectReferenceUndoUnit.cs (2)
28var currentSolution = Workspace.CurrentSolution; 43var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.RenameDocumentUndoUnit.cs (2)
33var documentId = _workspace.CurrentSolution.GetDocumentIdsWithFilePath(_filePath).FirstOrDefault(); 36var updatedSolution = _workspace.CurrentSolution.WithDocumentName(documentId, _toName);
ProjectSystem\VisualStudioWorkspaceImpl_SourceGenerators.cs (1)
70var documentIds = _workspace.CurrentSolution.GetDocumentIdsWithFilePath(moniker);
SyncNamespaces\SyncNamespacesCommandHandler.cs (5)
77visible = _workspace.CurrentSolution.Projects 106var projects = _workspace.CurrentSolution.Projects 118var solution = _workspace.CurrentSolution; 144if (_workspace.CurrentSolution.GetChanges(solution).GetProjectChanges().Any()) 154oldSolution: _workspace.CurrentSolution,
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (1)
224foreach (var p in _workspace.CurrentSolution.Projects)
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
304_stateDoNotAccessDirectly = new InProgressState(this, _workspace.CurrentSolution);
TaskList\ProjectExternalErrorReporter.cs (3)
86var project = _workspace.CurrentSolution.GetProject(_projectId); 131return _workspace.CurrentSolution.GetDocumentIdsWithFilePath(filePath) 316if (workspace.CurrentSolution.GetDocument(documentId) is Document document &&
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (1)
182var solution = _workspace.CurrentSolution;
Utilities\IVsEditorAdaptersFactoryServiceExtensions.cs (1)
30var document = workspace.CurrentSolution.GetDocument(contextDocumentId);
Venus\ContainedDocument.cs (4)
184foreach (var document in _workspace.CurrentSolution.GetProject(_project.Id).Documents) 205return hierarchy.TryGetItemId(_workspace.CurrentSolution.GetDocument(document.Id).FilePath); 242var originalDocument = _workspace.CurrentSolution.GetDocument(this.Id); 763var document = _workspace.CurrentSolution.GetDocument(this.Id);
Venus\ContainedLanguage.cs (1)
152if (Workspace.CurrentSolution.ContainsDocument(ContainedDocument.Id))
Workspace\GlobalUndoServiceFactory.WorkspaceGlobalUndoTransaction.cs (1)
61var solution = visualStudioWorkspace.CurrentSolution;
Workspace\SourceGeneratedFileManager.cs (1)
335var project = this.Workspace.CurrentSolution.GetProject(_documentIdentity.DocumentId.ProjectId);
Workspace\VisualStudioDocumentNavigationService.cs (4)
60var document = workspace.CurrentSolution.GetRequiredDocument(documentId); 77var document = workspace.CurrentSolution.GetRequiredDocument(documentId); 191var solution = workspace.CurrentSolution; 260var document = workspace.CurrentSolution.GetTextDocument(documentId);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
SemanticSearch\SemanticSearchDocumentNavigationService.cs (1)
31Debug.Assert(documentId == SemanticSearchUtilities.GetQueryDocumentId(workspace.CurrentSolution));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (13)
CodeModel\AbstractFileCodeElementTests.cs (1)
51=> GetWorkspace().CurrentSolution;
CodeModel\FileCodeModelTestHelpers.cs (1)
35var project = workspace.CurrentSolution.Projects.Single();
DesignerAttribute\DesignerAttributeServiceTests.cs (1)
121var document = workspace.CurrentSolution.GetRequiredDocument(documentId);
DocumentOutline\DocumentOutlineTestsBase.cs (2)
100var solution = workspace.CurrentSolution; 134var locations = await GetAnnotatedLocationsAsync(testWorkspace, testWorkspace.CurrentSolution);
EditorConfigSettings\Aggregator\SettingsAggregatorTests.cs (1)
28Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution
EditorConfigSettings\DataProvider\DataProviderTests.cs (1)
29Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution
F1Help\F1HelpTests.cs (1)
30var actualText = await service.GetHelpTermAsync(workspace.CurrentSolution.Projects.First().Documents.First(), workspace.Documents.First().SelectedSpans.First(), CancellationToken.None);
Interactive\Commands\ResetInteractiveTests.cs (2)
51var project = workspace.CurrentSolution.Projects.FirstOrDefault(p => p.AssemblyName == "ResetInteractiveTestsAssembly"); 145workspace.CurrentSolution.GetProject(p.ProjectId)));
PersistentStorage\AbstractPersistentStorageTests.cs (3)
844var location = configuration.TryGetStorageLocation(SolutionKey.ToSolutionKey(workspace.CurrentSolution)); 985var solution = workspace.CurrentSolution; 999return workspace.CurrentSolution;
Microsoft.VisualStudio.LanguageServices.LiveShare (10)
Client\RemoteLanguageServiceWorkspace.cs (10)
241var docId = CurrentSolution.GetDocumentIdsWithFilePath(filePath).FirstOrDefault(); 244return CurrentSolution.GetDocument(docId); 279var docId = CurrentSolution.GetDocumentIdsWithFilePath(filePath).FirstOrDefault(); 282return CurrentSolution.GetDocument(docId); 317var project = CurrentSolution.Projects.FirstOrDefault(p => p.Name == projectName && p.Language == language); 331project = CurrentSolution.GetRequiredProject(projectInfo.Id); 341return CurrentSolution.GetRequiredDocument(docInfo.Id); 370if (CurrentSolution.ContainsProject(id.ProjectId)) 386var doc = CurrentSolution.GetDocument(documentId); 476var document = CurrentSolution.GetDocument(documentId);
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (10)
CallHierarchy\CallHierarchyTestState.vb (1)
125Dim documents = Workspace.CurrentSolution.Projects.SelectMany(Function(p) p.Documents).Where(Function(d) documentNames.Contains(d.Name))
CodeModel\CodeModelTestHelpers.vb (2)
60Dim project = workspace.CurrentSolution.Projects.Single() 137Dim document = state.Workspace.CurrentSolution.GetDocument(cursorDocument.Id)
CodeModel\CodeModelTestState.vb (1)
91Dim projectId = Workspace.CurrentSolution.ProjectIds.Single()
CodeModel\Mocks\MockVisualStudioWorkspace.vb (6)
39SetCurrentSolutionEx(testWorkspace.CurrentSolution) 50Assert.True(_workspace.TryApplyChanges(_workspace.CurrentSolution.WithDocumentText(documentId, newText))) 51SetCurrentSolutionEx(_workspace.CurrentSolution) 56SetCurrentSolutionEx(_workspace.CurrentSolution) 60Assert.True(_workspace.TryApplyChanges(_workspace.CurrentSolution.RemoveDocument(documentId))) 61SetCurrentSolutionEx(_workspace.CurrentSolution)
Microsoft.VisualStudio.LanguageServices.UnitTests (143)
ChangeSignature\AddParameterViewModelTests.vb (1)
301Dim workspaceDoc = workspace.CurrentSolution.GetDocument(doc.Id)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
461Dim workspaceDoc = workspace.CurrentSolution.GetDocument(doc.Id)
CodeModel\AbstractEventCollectorTests.vb (3)
104Dim project = workspace.CurrentSolution.Projects.First() 108Dim codeDocument = workspace.CurrentSolution.GetDocument(workspace.Documents(0).Id) 111Dim changeDocument = workspace.CurrentSolution.GetDocument(workspace.Documents(1).Id)
CodeModel\CSharp\FileCodeModelTests.vb (1)
1022Dim changeDocument = changedWorkspace.CurrentSolution.GetDocument(changedWorkspace.Documents(0).Id)
CodeModel\CSharp\SyntaxNodeKeyTests.vb (2)
231Dim project = workspace.CurrentSolution.Projects.First() 238Dim document = workspace.CurrentSolution.GetDocument(cursorDocument.Id)
CodeModel\VisualBasic\FileCodeModelTests.vb (2)
1020Dim changeDocument = changedworkspace.CurrentSolution.GetDocument(changedworkspace.Documents.First(Function(d) d.Name.Equals("File1.vb")).Id) 1036changeDocument = changedworkspace.CurrentSolution.GetDocument(changedworkspace.Documents.First(Function(d) d.Name.Equals("File2.vb")).Id)
CommonControls\MemberSelectionViewModelTests.vb (1)
177Dim workspaceDoc = workspace.CurrentSolution.GetDocument(doc.Id)
CommonControls\NewTypeDestinationSelectionViewModelTests.vb (1)
230Dim workspaceDoc = workspace.CurrentSolution.GetDocument(doc.Id)
DebuggerIntelliSense\TestState.vb (1)
40Dim language = Workspace.CurrentSolution.Projects.First().Language
Debugging\VisualBasicBreakpointResolutionServiceTests.vb (1)
28Dim document = workspace.CurrentSolution.Projects.First.Documents.First
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (10)
51workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences({analyzerReference})) 60Dim project = workspace.CurrentSolution.Projects.First() 79Dim project = workspace.CurrentSolution.Projects.First() 97workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences({analyzerReference})) 106Dim project = workspace.CurrentSolution.Projects.First() 119Dim project = workspace.CurrentSolution.Projects.First() 155Dim project = workspace.CurrentSolution.Projects.First() 195Dim project = workspace.CurrentSolution.Projects.First() 229workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences({analyzerReference})) 234Dim project = workspace.CurrentSolution.Projects.First()
ExtractInterface\ExtractInterfaceViewModelTests.vb (1)
293Dim workspaceDoc = workspace.CurrentSolution.GetDocument(doc.Id)
GenerateType\GenerateTypeViewModelTests.vb (1)
841Dim document = workspace.CurrentSolution.GetDocument(testDoc.Id)
GoToDefinition\GoToDefinitionApiTests.vb (1)
21Dim solution = workspace.CurrentSolution
Help\HelpTests.vb (1)
21Assert.Equal(expected, Await service.GetHelpTermAsync(workspace.CurrentSolution.Projects.First().Documents.First(), workspace.Documents.First().SelectedSpans.First(), CancellationToken.None))
InheritanceMargin\InheritanceMarginViewModelTests.vb (1)
81Dim document = workspace.CurrentSolution.GetDocument(testDocument.Id)
MoveStaticMembers\MoveStaticMembersViewModelTest.vb (1)
28Dim workspaceDoc = workspace.CurrentSolution.GetDocument(doc.Id)
Preview\PreviewChangesTests.vb (11)
39Dim document = workspace.CurrentSolution.GetDocument(documentId) 50workspace.CurrentSolution, 92Dim document = workspace.CurrentSolution.GetDocument(docId) 110workspace.CurrentSolution, 134Dim document = workspace.CurrentSolution.GetDocument(documentId) 145workspace.CurrentSolution, 187Dim document = workspace.CurrentSolution.GetDocument(docId) 210workspace.CurrentSolution, 270Dim document1 = workspace.CurrentSolution.GetDocument(documentId1) 273Dim document2 = workspace.CurrentSolution.GetDocument(documentId2) 290workspace.CurrentSolution,
Progression\ProgressionTestState.vb (7)
29Dim graphBuilder As New GraphBuilder(Workspace.CurrentSolution) 31Assert.NotNull(graphBuilder.TryAddNodeForDocument(Workspace.CurrentSolution.GetDocument(documentId), CancellationToken.None)) 37Dim document = Workspace.CurrentSolution.GetDocument(hostDocument.Id) 44Dim graphBuilder As New GraphBuilder(Workspace.CurrentSolution) 51Dim graphBuilder = Await graphQuery.GetGraphAsync(Workspace.CurrentSolution, graphContext, CancellationToken.None) 79Dim document = Workspace.CurrentSolution.GetDocument(hostDocument.Id) 84Return Workspace.CurrentSolution
ProjectSystemShim\VisualBasicCodeModelLifetimeTests.vb (2)
28Dim originalDocumentId = environment.Workspace.CurrentSolution.Projects.Single().DocumentIds.Single() 38Dim newDocumentId = environment.Workspace.CurrentSolution.Projects.Single().DocumentIds.Single()
ProjectSystemShim\VisualBasicCompilerOptionsTests.vb (10)
25Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 44Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 63Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 86Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 109Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 129Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 149Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 168Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 188Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 196workspaceProject = environment.Workspace.CurrentSolution.Projects.Single()
ProjectSystemShim\VisualBasicProjectTests.vb (3)
20Assert.Equal(environment.Workspace.CurrentSolution.Projects.Single().Name, "Test") 24Assert.Equal(environment.Workspace.CurrentSolution.Projects.Single().Name, "Test2") 35Assert.Single(environment.Workspace.CurrentSolution.Projects)
ProjectSystemShim\VisualBasicSpecialReferencesTests.vb (10)
22Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 41Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 60Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 77Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 84workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 92workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 107Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 122Dim workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 128workspaceProject = environment.Workspace.CurrentSolution.Projects.Single() 134workspaceProject = environment.Workspace.CurrentSolution.Projects.Single()
ProjectSystemShim\VisualStudioProjectTests\AnalyzerReferenceTests.vb (16)
37Assert.Single(environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences) 52Dim analyzers = environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Single().GetAnalyzers(LanguageNames.CSharp) 72Dim analyzers = environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Single().GetAnalyzers(LanguageNames.CSharp) 91Dim analyzers = environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Single().GetAnalyzers(LanguageNames.CSharp) 126Assert.Empty(environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences) 131Assert.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)) 206AssertEx.Equal({path1, path2}, environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath)) 229Assert.Empty(environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences) 238}, environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath)) 270Assert.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)
39Dim dynamicSourceFile = environment.Workspace.CurrentSolution.Projects.Single().Documents.Single() 47Assert.Empty(environment.Workspace.CurrentSolution.Projects.Single().Documents) 89Assert.Empty(environment.Workspace.CurrentSolution.Projects.Single().Documents) 93Assert.Empty(environment.Workspace.CurrentSolution.Projects.Single().Documents)
ProjectSystemShim\VisualStudioProjectTests\MetadataToProjectReferenceConversionTests.vb (10)
30Dim getProject2 = Function() environment.Workspace.CurrentSolution.GetProject(project2.Id) 67Dim getProject2 = Function() environment.Workspace.CurrentSolution.GetProject(project2.Id) 102Dim getReferencingProject = Function() environment.Workspace.CurrentSolution.GetProject(referencingProject.Id) 138Dim getReferencingProject = Function() environment.Workspace.CurrentSolution.GetProject(referencingProject.Id) 175Dim getReferencingProject = Function() environment.Workspace.CurrentSolution.GetProject(referencingProject.Id) 203Dim getReferencingProject = Function() environment.Workspace.CurrentSolution.GetProject(referencingProject.Id) 249Dim getReferencingProject = Function() environment.Workspace.CurrentSolution.GetProject(referencingProject.Id) 264Dim getReferencingProject = Function() environment.Workspace.CurrentSolution.GetProject(referencingProject.Id) 300Dim getReferencingProject = Function() environment.Workspace.CurrentSolution.GetProject(referencingProject.Id) 369Assert.Single(environment.Workspace.CurrentSolution.Projects.Single().MetadataReferences)
ProjectSystemShim\VisualStudioProjectTests\ProjectSystemProjectFactoryTests.vb (2)
25Dim projectInSolution = environment.Workspace.CurrentSolution.GetProject(project1.Id) 33Dim newProjectInSolution As Project = environment.Workspace.CurrentSolution.GetProject(project1.Id)
ProjectSystemShim\VisualStudioProjectTests\SolutionIdTests.vb (4)
19Dim solutionId = environment.Workspace.CurrentSolution.Id 27Assert.NotEqual(solutionId, environment.Workspace.CurrentSolution.Id) 36Dim solutionId = environment.Workspace.CurrentSolution.Id 40Assert.Equal(solutionId, environment.Workspace.CurrentSolution.Id)
ProjectSystemShim\VisualStudioProjectTests\WorkspaceChangedEventTests.vb (4)
31Assert.Equal(environment.Workspace.CurrentSolution.Projects.Single().DocumentIds.Single(), change.DocumentId) 71Assert.Equal(environment.Workspace.CurrentSolution.Projects.Single().AdditionalDocumentIds.Single(), change.DocumentId) 101Dim startingSolution = environment.Workspace.CurrentSolution 106Assert.Same(startingSolution, environment.Workspace.CurrentSolution)
PullMemberUp\PullMemberUpViewModelTest.vb (1)
249Dim workspaceDoc = workspace.CurrentSolution.GetDocument(doc.Id)
RQName\RQNameTests.vb (1)
245Dim workspaceDoc = workspace.CurrentSolution.GetDocument(doc.Id)
Snippets\CSharpSnippetExpansionClientTests.vb (1)
381Dim document = workspace.CurrentSolution.Projects.Single().Documents.Single()
Snippets\VisualBasicSnippetExpansionClientTests.vb (1)
402Dim document = workspace.CurrentSolution.Projects.Single().Documents.Single()
SolutionExplorer\SourceGeneratorItemTests.vb (4)
90Dim sourceGeneratedDocument = Assert.Single(Await workspace.CurrentSolution.GetProject(projectId).GetSourceGeneratedDocumentsAsync()) 122Dim expectedNames = Aggregate document In workspace.CurrentSolution.GetProject(projectId).AdditionalDocuments 159workspace.OnAdditionalDocumentRemoved(workspace.CurrentSolution.GetProject(projectId).AdditionalDocumentIds.Single()) 255workspace.OnAdditionalDocumentTextChanged(workspace.CurrentSolution.Projects.Single().AdditionalDocumentIds.Single(),
Venus\AbstractContainedLanguageCodeSupportTests.vb (2)
40Dim document = workspace.CurrentSolution.Projects.Single().Documents.Single() 58Return workspace.CurrentSolution.Projects.Single().Documents.Single()
Venus\DocumentService_IntegrationTests.vb (11)
76Dim startDocument = workspace.CurrentSolution.GetDocument(cursorDocument.Id) 85Dim definitionText = Await workspace.CurrentSolution.GetDocument(definitionDocument.Id).GetTextAsync() 143Dim startDocument = workspace.CurrentSolution.GetDocument(originalDocument.Id) 148Dim results = Await codelensService.FindReferenceLocationsAsync(workspace.CurrentSolution, startDocument.Id, node, CancellationToken.None) 152Dim definitionText = Await workspace.CurrentSolution.GetDocument(definitionDocument.Id).GetTextAsync() 183Dim document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id) 201Dim currentDocument = workspace.CurrentSolution.GetDocument(document.Id) 223workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences({analyzerReference})) 225Dim document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id) 274Dim mappedDocument = testWorkspace.CurrentSolution.GetDocument(mappedTestDocument.Id) 312Dim mappedDocument = testWorkspace.CurrentSolution.GetDocument(mappedTestDocument.Id)
Venus\DocumentServiceTests.vb (7)
41Dim spans = Await spanMapper.MapSpansAsync(workspace.CurrentSolution.GetDocument(subjectDocument.Id), {New TextSpan(position, length:=0)}, CancellationToken.None) 65Dim 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) 116Dim document = Assert.IsType(Of SourceGeneratedDocument)(Await workspace.CurrentSolution.GetDocumentAsync(sourceGeneratedDocumentId, includeSourceGenerated:=True)) 140Dim result = Await excerptService.TryExcerptAsync(workspace.CurrentSolution.GetDocument(subjectDocument.Id), GetNamedSpan(subjectDocument), ExcerptMode.SingleLine, ClassificationOptions.Default, CancellationToken.None) 179Dim result = Await excerptService.TryExcerptAsync(workspace.CurrentSolution.GetDocument(subjectDocument.Id), GetNamedSpan(subjectDocument), ExcerptMode.Tooltip, ClassificationOptions.Default, CancellationToken.None) 226Dim result = Await excerptService.TryExcerptAsync(workspace.CurrentSolution.GetDocument(subjectDocument.Id), GetNamedSpan(subjectDocument), ExcerptMode.Tooltip, ClassificationOptions.Default, CancellationToken.None) 279Dim result = Await excerptService.TryExcerptAsync(workspace.CurrentSolution.GetDocument(subjectDocument.Id), GetNamedSpan(subjectDocument), ExcerptMode.SingleLine, ClassificationOptions.Default, CancellationToken.None)
VsNavInfo\VsNavInfoTests.vb (2)
829Dim document = workspace.CurrentSolution.GetDocument(hostDocument.Id) 867Dim document = workspace.CurrentSolution.GetDocument(hostDocument.Id)
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
ProjectSystemShim\VisualBasicProject.vb (1)
201Dim project = Workspace.CurrentSolution.GetProject(ProjectSystemProject.Id)
Venus\ContainedLanguageStaticEventBinding.vb (2)
74targetDocument = visualStudioWorkspace.CurrentSolution.GetDocument(targetDocument.Id) 102targetDocument = visualStudioWorkspace.CurrentSolution.GetDocument(targetDocument.Id)
Microsoft.VisualStudio.LanguageServices.Xaml (4)
Implementation\XamlProjectService.cs (4)
165var documentId = _workspace.CurrentSolution.GetDocumentIdsWithFilePath(filePath).Single(d => d.ProjectId == project.Id); 169var document = _workspace.CurrentSolution.GetRequiredDocument(documentId); 201var document = _workspace.CurrentSolution.GetDocument(documentId); 255var documentId = _workspace.CurrentSolution.GetDocumentIdsWithFilePath(newMoniker).Single(d => d.ProjectId == project.Id);
Roslyn.VisualStudio.DiagnosticsWindow (1)
Panels\WorkspacePanel.xaml.cs (1)
77var solution = workspace.CurrentSolution;
Roslyn.VisualStudio.Next.UnitTests (75)
Remote\RemoteHostClientServiceFactoryTests.cs (1)
64Assert.True(workspace.CurrentSolution.CompilationState.TryGetStateChecksums(out _));
Services\AssetProviderTests.cs (3)
75var solution = workspace.CurrentSolution; 103var solution = workspace.CurrentSolution; 128var project = workspace.CurrentSolution.Projects.First();
Services\ServiceHubServicesTests.cs (14)
68var solution = workspace.CurrentSolution; 90var solution = workspace.CurrentSolution; 145var solution = workspace.CurrentSolution; 196var solution = workspace.CurrentSolution; 207workspace.CurrentSolution, 208workspace.CurrentSolution.Projects.Single().Documents.Single(), 267var solution = workspace.CurrentSolution; 312var solution = workspace.CurrentSolution; 332solution = workspace.CurrentSolution; 346solution = workspace.CurrentSolution; 780var project = workspace.CurrentSolution 1489var remoteSolution = remoteWorkspace.CurrentSolution; 1525solution = localWorkspace.CurrentSolution; 1528var currentRemoteSolution = remoteWorkspace.CurrentSolution;
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (14)
79workspace.CurrentSolution, "MessageName", "JsonMessage", CancellationToken.None); 102workspace.CurrentSolution.Projects.Single().Documents.Single(), "MessageName", "JsonMessage", CancellationToken.None); 350localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 376localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 411localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 449localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 496localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 507localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 541localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 572localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 608localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 661localWorkspace.CurrentSolution.Projects.Single().Documents.Single(), 685localWorkspace.CurrentSolution, 691localWorkspace.CurrentSolution.Projects.Single().Documents.Single(),
Services\SolutionAssetCacheTests.cs (1)
74var solution = workspace.CurrentSolution;
Services\SolutionServiceTests.cs (35)
50var solution = workspace.CurrentSolution; 67var solution = workspace.CurrentSolution; 90var assetProvider = await GetAssetProviderAsync(workspace, remoteWorkspace, workspace.CurrentSolution); 92var solutionChecksum = await workspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None); 119var assetProvider = await GetAssetProviderAsync(workspace, remoteWorkspace, workspace.CurrentSolution); 121var solutionChecksum = await workspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None); 142var solution = workspace.CurrentSolution; 330var projectId = workspace.CurrentSolution.ProjectIds.First(); 361var projectId = workspace.CurrentSolution.ProjectIds.First(); 394var projectId = workspace.CurrentSolution.ProjectIds.First(); 428var solution1 = workspace.CurrentSolution; 478Assert.Equal(remoteSolution, remoteWorkspace.CurrentSolution); 488var solution = workspace.CurrentSolution; 508var solution = workspace.CurrentSolution 547var solution = workspace.CurrentSolution; 588var solution = workspace.CurrentSolution; 629var solution = workspace.CurrentSolution; 662var solution = workspace.CurrentSolution; 703var solution = workspace.CurrentSolution; 743var solution = workspace.CurrentSolution; 783var solution = workspace.CurrentSolution; 816var solution = workspace.CurrentSolution; 871var solution = workspace.CurrentSolution; 917var solution = workspace.CurrentSolution; 940var solution = workspace.CurrentSolution; 960solution = workspace.CurrentSolution; 985var solution = workspace.CurrentSolution; 1004var solution = workspace.CurrentSolution; 1036var solution = workspace.CurrentSolution; 1074var solution = workspace.CurrentSolution; 1100var solution = workspace.CurrentSolution; 1127var solution = workspace.CurrentSolution; 1156var solution = workspace.CurrentSolution; 1203var solution = workspace.CurrentSolution; 1279var solution = workspace.CurrentSolution;
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (7)
51var project = workspace.CurrentSolution.Projects.First(); 84var project = workspace.CurrentSolution.Projects.First(); 123var task = Task.Run(() => AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer: false, source.Token)); 159workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 164var project = workspace.CurrentSolution.Projects.First(); 204var project = workspace.CurrentSolution.Projects.First().AddAnalyzerReference(analyzerReference); 231var solution = workspace.CurrentSolution;
Test.Utilities (1)
CodeMetricsTestsBase.cs (1)
46.CurrentSolution