1479 references to 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)
180var updatedDocument = workspace.CurrentSolution.GetRequiredDocument(document.Id);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (217)
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(); 6133var document = workspace.CurrentSolution.Projects.First().Documents.First(); 6163var 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)
919var 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)
448var 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)
2468var solution = testWorkspace.CurrentSolution; 2721var solution = testWorkspace.CurrentSolution; 2776var solution = testWorkspace.CurrentSolution; 3061var document = workspace.CurrentSolution.GetRequiredDocument(testDocument.Id); 3185var compilation = await workspace.CurrentSolution.Projects.First(p => p.Name == "P3").GetCompilationAsync(); 3190var p1 = workspace.CurrentSolution.Projects.First(p => p.Name == "P1"); 3196var document = workspace.CurrentSolution.GetRequiredDocument(testDocument.Id); 3239var origComp = await workspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None); 3244var project = workspace.CurrentSolution.Projects.Single(); 3250var 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)
59var newSolution = workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]) 63var document = workspace.CurrentSolution.Projects.Single().Documents.Single(); 90ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 92var ideEngineDocument = ideEngineWorkspace.CurrentSolution.Projects.Single().Documents.Single(); 105var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result; 164var additionalDocId = DocumentId.CreateNewId(workspace.CurrentSolution.Projects.Single().Id); 170workspace.TryApplyChanges(workspace.CurrentSolution 174var sourceDocument = workspace.CurrentSolution.Projects.Single().Documents.Single(); 202workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 204var ideEngineDocument = workspace.CurrentSolution.Projects.Single().Documents.Single(); 258ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 260var ideEngineDocument = ideEngineWorkspace.CurrentSolution.Projects.Single().Documents.Single(); 279var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result; 338var compilerEngineCompilation = (CSharpCompilation)(await compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None)); 757Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences( 762var project = workspace.CurrentSolution.Projects.Single();
EditAndContinue\ActiveStatementTrackingServiceTests.cs (1)
68var 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)
789var project = workspace.CurrentSolution.Projects.Single(); 809var document = workspace.CurrentSolution.GetDocument(hostdoc.Id); 826var document = workspace.CurrentSolution.GetDocument(hostdoc.Id); 886var solution = workspace.CurrentSolution.WithAnalyzerReferences( 908var 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 (6)
143workspace.CurrentSolution, 183workspace.CurrentSolution, 220workspace.CurrentSolution, 257workspace.CurrentSolution, 288workspace.CurrentSolution, 346workspace.CurrentSolution,
Organizing\AbstractOrganizerTests.cs (1)
29var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (2)
169var document = masWorkspace!.CurrentSolution.GetRequiredDocument(info.DocumentId); 224var 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)
64var 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)
63var solution = workspace.CurrentSolution; 75Assert.Equal(solution, workspace.CurrentSolution); 85var solution = workspace.CurrentSolution; 92solution = workspace.CurrentSolution; 101var solution = workspace.CurrentSolution; 107solution = workspace.CurrentSolution; 116var solution = workspace.CurrentSolution; 121solution = workspace.CurrentSolution; 123solution = workspace.CurrentSolution; 132var solution = workspace.CurrentSolution; 143var solution = workspace.CurrentSolution; 157var solution = workspace.CurrentSolution; 184var solution = workspace.CurrentSolution; 223workspace.TryApplyChanges(workspace.CurrentSolution); 226var tree1 = await workspace.CurrentSolution 233var tree2 = await workspace.CurrentSolution 242var currentSnapshot = workspaceSnapshotBuilder.CurrentSolution; 260var solution = workspace.CurrentSolution; 274var solution = workspace.CurrentSolution; 285var snapshot = workspace.CurrentSolution; 296var solution = workspace.CurrentSolution; 313var solution = workspace.CurrentSolution; 324var snapshot = workspace.CurrentSolution; 335var solution = workspace.CurrentSolution; 352var solution = workspace.CurrentSolution; 362Assert.Empty(workspace.CurrentSolution.Projects); 369var solution = workspace.CurrentSolution; 384var solution = workspace.CurrentSolution; 394Assert.Empty(workspace.CurrentSolution.Projects.Single().Documents); 403var solution = workspace.CurrentSolution; 411var snapshot = workspace.CurrentSolution; 422var solution = workspace.CurrentSolution; 433var snapshot = workspace.CurrentSolution; 446var solution = workspace.CurrentSolution; 461var snapshot = workspace.CurrentSolution; 479var solutionX = workspace.CurrentSolution; 494var solutionY = workspace.CurrentSolution; 512var solutionZ = workspace.CurrentSolution; 533var solutionX = workspace.CurrentSolution; 548var solutionY = workspace.CurrentSolution; 572var cs = workspace.CurrentSolution; 601var solutionX = workspace.CurrentSolution; 616var solutionY = workspace.CurrentSolution; 643var cs = workspace.CurrentSolution; 665var cs = workspace.CurrentSolution; 693var solution = workspace.CurrentSolution; 704solution = workspace.CurrentSolution; 729Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 732var oldSolution = workspace.CurrentSolution; 736Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 760var oldSolution = workspace.CurrentSolution; 766Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 781var oldSolution = workspace.CurrentSolution; 787Assert.Equal(0, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1053var project = workspace.CurrentSolution.Projects.Single(); 1077var project = workspace.CurrentSolution.Projects.Single(); 1109var project = workspace.CurrentSolution.Projects.Single(); 1113var oldSolution = workspace.CurrentSolution; 1122var doc = workspace.CurrentSolution.GetAdditionalDocument(additionalDoc.Id); 1142var project = workspace.CurrentSolution.Projects.Single(); 1146var oldSolution = workspace.CurrentSolution; 1155var doc = workspace.CurrentSolution.GetAnalyzerConfigDocument(analyzerConfigDoc.Id); 1232var project = workspace.CurrentSolution.Projects.Single(); 1236var oldSolution = workspace.CurrentSolution; 1239var doc = workspace.CurrentSolution.GetAdditionalDocument(additionalDoc.Id); 1243Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1244Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1248oldSolution = workspace.CurrentSolution; 1253Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1254Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1255Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1268var project = workspace.CurrentSolution.Projects.Single(); 1272var oldSolution = workspace.CurrentSolution; 1275var doc = workspace.CurrentSolution.GetAnalyzerConfigDocument(analyzerConfigDoc.Id); 1279Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1280Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1284oldSolution = workspace.CurrentSolution; 1289Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1290Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1291Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1306var project = workspace.CurrentSolution.Projects.Single(); 1312Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1313Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1316project = workspace.CurrentSolution.Projects.Single(); 1319Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1320Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1321Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1334var project = workspace.CurrentSolution.Projects.Single(); 1340Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1341Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1344project = workspace.CurrentSolution.Projects.Single(); 1347Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1348Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1349Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1364var documentIdsWithFilePath = workspace.CurrentSolution.GetDocumentIdsWithFilePath(docFilePath); 1368documentIdsWithFilePath = workspace.CurrentSolution.GetDocumentIdsWithFilePath(additionalDocFilePath); 1384var documentIdsWithFilePath = workspace.CurrentSolution.GetDocumentIdsWithFilePath(docFilePath); 1388documentIdsWithFilePath = workspace.CurrentSolution.GetDocumentIdsWithFilePath(analyzerConfigDocFilePath); 1463var solution = workspace1.CurrentSolution; 1477var currentOptionValue = workspace1.CurrentSolution.Options.GetOption(optionKey); 1500var beforeSolutionForPrimaryWorkspace = primaryWorkspace.CurrentSolution; 1501var beforeSolutionForSecondaryWorkspace = secondaryWorkspace.CurrentSolution; 1514Assert.NotEqual(beforeSolutionForPrimaryWorkspace, primaryWorkspace.CurrentSolution); 1515Assert.NotEqual(beforeSolutionForSecondaryWorkspace, secondaryWorkspace.CurrentSolution); 1527Assert.NotSame(beforeSolutionForPrimaryWorkspace, primaryWorkspace.CurrentSolution); 1528Assert.NotSame(beforeSolutionForSecondaryWorkspace, secondaryWorkspace.CurrentSolution);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
59var solution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (21)
Diagnostics\Suppression\SuppressionTests.cs (3)
447workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 758var solution = workspace.CurrentSolution; 1000var solution = workspace.CurrentSolution;
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (14)
301var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 368var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 395var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source); 429var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 462var oldSolution = workspace.CurrentSolution. 511var oldSolution = workspace.CurrentSolution; 516var newSolution = workspace.CurrentSolution.WithDocumentText(documentId, SourceText.From(source2)); 542var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source); 580var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 619var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 660var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 707var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 741var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 795var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1);
SemanticSearch\CSharpSemanticSearchServiceTests.cs (4)
64var solution = workspace.CurrentSolution; 101var solution = workspace.CurrentSolution; 151var solution = workspace.CurrentSolution; 205var 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)
30var project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.CSharp); 91var 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)
36var currentSolution = _workspace.CurrentSolution.SolutionState; 94UpdateProviders(_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.GetDocument(documentId);
Remote\SolutionChecksumUpdater.cs (2)
168var solution = _workspace.CurrentSolution; 199var solution = _workspace.CurrentSolution;
RenameTracking\RenameTrackingTaggerProvider.cs (1)
72var 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 (57)
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)
370var currentDocument = workspace.CurrentSolution.GetDocument(workspaceFixture.Target.CurrentDocument.Id); 694var document = workspace.CurrentSolution.GetRequiredDocument(workspaceFixture.Target.CurrentDocument.Id); 957var solution = testWorkspace.CurrentSolution; 1013var solution = testWorkspace.CurrentSolution; 1042var solution = testWorkspace.CurrentSolution; 1277var document = workspace.CurrentSolution.GetDocument(hostDocument.Id); 1322var document = workspace.CurrentSolution.GetDocument(documentId);
Debugging\AbstractDataTipInfoGetterTests.cs (1)
71workspace.CurrentSolution.Projects.First().Documents.First(),
Diagnostics\DiagnosticTaggerWrapper.cs (1)
41workspace.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)
57OriginalSolution = Workspace.CurrentSolution; 65ExtractFromDocument = Workspace.CurrentSolution.GetDocument(_testDocument.Id); 123return 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);
LanguageServer\AbstractLanguageServerProtocolTests.cs (8)
340var solution = workspace.CurrentSolution; 415var generatedDocumentId = DocumentId.CreateNewId(workspace.CurrentSolution.ProjectIds.First()); 426var newSolution = workspace.CurrentSolution.AddDocument(generatedDocumentInfo); 434var solution = workspace.CurrentSolution 446var solution = workspace.CurrentSolution 597var locations = await GetAnnotatedLocationsAsync(testWorkspace, testWorkspace.CurrentSolution); 623var locations = await GetAnnotatedLocationsAsync(testWorkspace, testWorkspace.CurrentSolution); 759public Solution GetCurrentSolution() => TestWorkspace.CurrentSolution;
NavigateTo\AbstractNavigateToTests.cs (1)
243=> [_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)
350var document = testWorkspace.CurrentSolution.GetDocument(documentId); 353document = testWorkspace.CurrentSolution.GetDocument(documentId); 469var document = testWorkspace.CurrentSolution.GetDocument(documentId);
SpellCheck\AbstractSpellCheckSpanTests.cs (1)
28var document = workspace.CurrentSolution.Projects.Single().Documents.Single();
Structure\AbstractSyntaxStructureProviderTests.cs (2)
51var document = workspace.CurrentSolution.GetRequiredDocument(hostDocument.Id); 70var 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 (227)
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])); 397var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 778var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 1071sourceDocument = workspace.CurrentSolution.Projects.Single().Documents.Single();
CodeGeneration\AbstractCodeGenerationTests.cs (1)
31var project = workspace.CurrentSolution
CodeGeneration\CodeGenerationTests.cs (3)
865this.Document = Workspace.CurrentSolution.Projects.Single().Documents.Single(); 876var semanticModel = await workspace.CurrentSolution.Projects.Single().Documents.Single().GetSemanticModelAsync(); 881public 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 (25)
61workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 71workspace.CurrentSolution, projectId: null, documentId: null, diagnosticIds: null, shouldIncludeAnalyzer: null, getDocuments: null, 86workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 100workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 115workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 135workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 154workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 257workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 292var solution = workspace.CurrentSolution; 329var project = workspace.CurrentSolution.Projects.Single(); 340var project = workspace.CurrentSolution.Projects.Single(); 351var project = workspace.CurrentSolution.Projects.Single(); 376var solution = workspace.CurrentSolution; 509workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 511var project = workspace.CurrentSolution.Projects.Single(); 624workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 626var project = workspace.CurrentSolution.Projects.Single(); 702workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 703var project = workspace.CurrentSolution.Projects.Single(); 740var project = workspace.CurrentSolution.Projects.Single(); 751project = workspace.CurrentSolution.Projects.Single(); 816workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 818var project = workspace.CurrentSolution.Projects.Single(); 859Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(new TestGeneratorReference(generator)).Solution)); 861var 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)
58workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences( 66var document = workspace.CurrentSolution.GetDocument(documentId);
EditAndContinue\EditAndContinueLanguageServiceTests.cs (4)
69solution = workspace.CurrentSolution; 116await localWorkspace.ChangeSolutionAsync(localWorkspace.CurrentSolution 121var solution = localWorkspace.CurrentSolution; 257solution = 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);
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; } 311var 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 (5)
41var definition = await service.TryFindDefinitionAsync(workspace.CurrentSolution, stackFrame, StackFrameSymbolPart.Method, CancellationToken.None); 47var doc = workspace.CurrentSolution.GetRequiredDocument(cursorDoc.Id); 56var expectedDefinition = expectedSymbol.ToNonClassifiedDefinitionItem(workspace.CurrentSolution, includeHiddenLocations: true); 825var definition = await service.TryFindDefinitionAsync(workspace.CurrentSolution, parsedFame, StackFrameSymbolPart.Method, CancellationToken.None); 857var definition = await service.TryFindDefinitionAsync(workspace.CurrentSolution, frame, StackFrameSymbolPart.Method, CancellationToken.None);
Structure\BlockStructureServiceTests.cs (1)
116var document = workspace.CurrentSolution.GetDocument(hostDocument.Id);
Structure\StructureTaggerTests.cs (1)
403var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);
SymbolFinder\DependentTypeFinderTests.cs (18)
53var solution = workspace.CurrentSolution; 94var solution = workspace.CurrentSolution; 141var solution = workspace.CurrentSolution; 186var solution = workspace.CurrentSolution; 227var solution = workspace.CurrentSolution; 269var solution = workspace.CurrentSolution; 311var solution = workspace.CurrentSolution; 351var solution = workspace.CurrentSolution; 392var solution = workspace.CurrentSolution; 432var solution = workspace.CurrentSolution; 463var solution = workspace.CurrentSolution; 512var solution = workspace.CurrentSolution; 564var solution = workspace.CurrentSolution; 591var solution = workspace.CurrentSolution; 638var solution = workspace.CurrentSolution; 664var solution = workspace.CurrentSolution; 728var solution = workspace.CurrentSolution; 771var solution = workspace.CurrentSolution;
SymbolFinder\FindSymbolAtPositionTests.cs (1)
21var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.Single().Id);
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)
52var type = (ITypeSymbol)(await workspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 124var csharpType = (ITypeSymbol)(await csharpWorkspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 125var vbType = (await vbWorkspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 194var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 195var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 196var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 197var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 245var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 246var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 247var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 248var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 284var typeC = (await workspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 285var typeD = (await workspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("D").Single(); 328var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 329var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 353var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 354var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 378var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 379var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 403var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 404var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 428var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 429var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 455var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 456var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 482var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 483var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 509var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 510var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 534var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 535var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 559var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 560var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 586var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 587var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 620var csharpType1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 621var vbType1 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 665var csharpType1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 666var vbType1 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 696var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 722var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 723var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 757var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 758var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 790var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 791var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 825var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 826var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 856var outer1 = (INamespaceSymbol)(await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").Single(); 857var outer2 = (INamespaceSymbol)(await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").Single(); 933var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 934var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 935var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 936var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 970var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 971var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 995var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 996var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1020var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1021var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1051var outer = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Outer").Single(); 1052var other = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Other").Single(); 1081var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1082var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1112var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1113var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1152var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1153var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1182var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1183var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1212var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1213var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1243var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1244var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1274var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1275var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1306var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1307var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1343var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1344var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1407var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1408var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1470var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1471var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1533var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1534var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1621var comp1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()); 1622var comp2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()); 1695var comp1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()); 1696var comp2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()); 1718var namespace1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetNamespaceMembers().Single(n => n.Name == "N").GetNamespaceMembers().Single(n => n.Name == "M"); 1719var 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)
24var oldSolution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.Features (8)
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (2)
112var newSolution = workspace.CurrentSolution.WithDocumentText( 124var 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); 27var definition = await _stackTraceExplorerService.TryFindDefinitionAsync(workspace.CurrentSolution, parsedFrame.UnderlyingObject, StackFrameSymbolPart.Method, cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
45var (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)
66var solution = workspace.CurrentSolution;
EditAndContinue\EmitSolutionUpdateResultsTests.cs (2)
30solution = workspace.CurrentSolution; 70var document = workspace.CurrentSolution.
EditAndContinue\RemoteEditAndContinueServiceTests.cs (5)
78await localWorkspace.ChangeSolutionAsync(localWorkspace.CurrentSolution 85var solution = localWorkspace.CurrentSolution; 141localWorkspace.CurrentSolution, 219var results = await sessionProxy.EmitSolutionUpdateAsync(localWorkspace.CurrentSolution, runningProjects: [project.Id], activeStatementSpanProvider, CancellationToken.None); 263var 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 (9)
HostWorkspace\LanguageServerProjectSystem.cs (1)
82_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);
HostWorkspace\Razor\RazorDynamicFileInfoProvider.cs (1)
84var textDocument = await _workspaceFactory.Workspace.CurrentSolution.GetTextDocumentAsync(response.CSharpDocument, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Features\Diagnostics\DiagnosticAnalyzerService.cs (1)
104return analyzer.GetCachedDiagnosticsAsync(workspace.CurrentSolution, projectId, documentId, includeSuppressedDiagnostics, includeLocalDocumentDiagnostics, includeNonLocalDocumentDiagnostics, cancellationToken);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.HostStates.cs (1)
20var analyzerReferences = _workspace.CurrentSolution.SolutionState.Analyzers.HostAnalyzerReferences;
Workspaces\LspWorkspaceManager.cs (3)
147foreach (var documentId in workspace.CurrentSolution.GetDocumentIds(uri)) 355var workspaceCurrentSolution = workspace.CurrentSolution; 393workspaceCurrentSolution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (15)
Metadata\LspMetadataAsSourceWorkspaceTests.cs (1)
130var doc = testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.CurrentSolution.Projects.SingleOrDefault()?.Documents.SingleOrDefault();
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (1)
309return testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.CurrentSolution.Projects.SingleOrDefault()?.Documents.Single();
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (10)
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)); 149Assert.True(workspace.CurrentSolution.FallbackAnalyzerOptions.TryGetValue(LanguageNames.CSharp, out var fallbackOptions)); 156var projectWithConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithConfig.Id); 195var projectWithoutConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithoutConfig.Id); 262Assert.Empty(workspace.CurrentSolution.FallbackAnalyzerOptions); 267var optionsAfterProjectAdded = workspace.CurrentSolution.FallbackAnalyzerOptions; 274Assert.Same(optionsAfterProjectAdded, workspace.CurrentSolution.FallbackAnalyzerOptions);
Workspaces\LspWorkspaceManagerTests.cs (3)
446var newProjectWorkspaceTwo = testWorkspaceTwo.CurrentSolution.Projects.First().WithAssemblyName("NewCSProj1"); 483var documentUri = testWorkspace.CurrentSolution.Projects.First().Documents.First().GetURI(); 502var newProject = testWorkspace.CurrentSolution.Projects.First().WithAssemblyName(newAssemblyName);
Microsoft.CodeAnalysis.Remote.ServiceHub (8)
Host\RemoteWorkspace.cs (4)
52var currentSolutionChecksum = await this.CurrentSolution.CompilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false); 212var currentSolution = this.CurrentSolution; 239/// cref="Workspace.CurrentSolution"/> of this <see cref="RemoteWorkspace"/> is the responsibility of any 247/// fork off of <see cref="Workspace.CurrentSolution"/> if possible. The latter is almost always what will
Host\RemoteWorkspace.SolutionCreator.cs (1)
626await TestUtils.AssertChecksumsAsync(_assetProvider, checksumFromRequest, workspace.CurrentSolution, incrementalSolutionBuilt, projectConeId).ConfigureAwait(false);
Host\RemoteWorkspace_SolutionCaching.cs (1)
128solutions.Add(this.CurrentSolution);
Host\RemoteWorkspaceManager.cs (1)
42/// cref="Workspace.CurrentSolution"/> of the workspace it is created against (as well as any recent in-flight
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (1)
100var 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)
464originalSolution ??= changedSolution.Workspace.CurrentSolution;
CodeActions\Operations\ApplyChangesOperation.cs (1)
53var currentSolution = workspace.CurrentSolution;
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (1)
121var 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)
285TryReportCompilationThrownAway(_projectSystemProjectFactory.Workspace.CurrentSolution, Id); 500private bool HasBeenRemoved => !_projectSystemProjectFactory.Workspace.CurrentSolution.ContainsProject(Id); 1303return _projectSystemProjectFactory.Workspace.CurrentSolution.GetRequiredProject(Id).AllProjectReferences.Contains(projectReference); 1311var projectReferencesInWorkspace = _projectSystemProjectFactory.Workspace.CurrentSolution.GetRequiredProject(Id).AllProjectReferences; 1350if (!_projectSystemProjectFactory.Workspace.CurrentSolution.ContainsProject(Id)) 1377var project = w.CurrentSolution.GetRequiredProject(Id); 1385if (w.CurrentSolution.ProjectIds.Count == 1)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (2)
155analyzerReferences: w.CurrentSolution.AnalyzerReferences).WithTelemetryId(SolutionTelemetryId); 391project = Workspace.CurrentSolution.GetRequiredProject(projectId);
Workspace\TextExtensions.cs (4)
27var solution = workspace.CurrentSolution; 63var solution = workspace.CurrentSolution; 110var solution = workspace.CurrentSolution; 131return workspace.CurrentSolution.GetDocument(id);
Workspace\Workspace.cs (18)
164/// Sets the <see cref="CurrentSolution"/> of this workspace. This method does not raise a <see cref="WorkspaceChanged"/> event. 174/// Sets the <see cref="CurrentSolution"/> of this workspace. This method does not raise a <see 189var oldSolution = this.CurrentSolution; 219/// Applies specified transformation to <see cref="CurrentSolution"/>, updates <see cref="CurrentSolution"/> to 229/// <returns>True if <see cref="CurrentSolution"/> was set to the transformed solution, false if the 404/// Ensures that whenever a new language is added to <see cref="CurrentSolution"/> we 406/// Conversely, if a language is no longer present in <see cref="CurrentSolution"/> 411/// <see cref="CurrentSolution"/> as appropriate. 415/// of any <see cref="Solution"/> snapshot stored in <see cref="CurrentSolution"/>. 453/// Applies specified transformation to <see cref="CurrentSolution"/>, updates <see cref="CurrentSolution"/> to 464/// <param name="onBeforeUpdate">Action to perform immediately prior to updating <see cref="CurrentSolution"/>. 465/// The action will be passed the old <see cref="CurrentSolution"/> that will be replaced and the exact solution 469/// <param name="onAfterUpdate">Action to perform once <see cref="CurrentSolution"/> has been updated. The 470/// action will be passed the old <see cref="CurrentSolution"/> that was just replaced and the exact solution it 560/// Setter also force updates the <see cref="CurrentSolution"/> to have the updated <see cref="Solution.Options"/>. 566return 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)
231var currentSolution = this.CurrentSolution;
Microsoft.CodeAnalysis.Workspaces.MSBuild (12)
MSBuild\MSBuildWorkspace.cs (11)
211return this.CurrentSolution; 250var projectMap = ProjectMap.Create(this.CurrentSolution); 261var projectResult = this.CurrentSolution.GetProject(projects[0].Id); 387var document = this.CurrentSolution.GetDocument(documentId); 405var document = this.CurrentSolution.GetAdditionalDocument(documentId); 453var project = this.CurrentSolution.GetRequiredProject(info.Id.ProjectId); 513var document = this.CurrentSolution.GetDocument(documentId); 597var relativePath = PathUtilities.GetRelativePath(Path.GetDirectoryName(CurrentSolution.GetRequiredProject(projectId).FilePath)!, peRef.FilePath); 627var project = this.CurrentSolution.GetProject(projectId); 652var project = this.CurrentSolution.GetProject(projectReference.ProjectId); 667var 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)
87Assert.Single(workspace.CurrentSolution.ProjectIds); 112Assert.Single(workspace.CurrentSolution.ProjectIds); 123Assert.Equal(2, workspace.CurrentSolution.ProjectIds.Count); 130Assert.Equal(libraryProject.FilePath, workspace.CurrentSolution.GetProject(projectRefId).FilePath); 152Assert.Equal(2, workspace.CurrentSolution.ProjectIds.Count); 163Assert.Equal(3, workspace.CurrentSolution.ProjectIds.Count); 195Assert.Equal(3, workspace.CurrentSolution.ProjectIds.Count); 200foreach (var project in workspace.CurrentSolution.Projects) 213foreach (var project in workspace.CurrentSolution.Projects) 237Assert.Equal(3, workspace.CurrentSolution.ProjectIds.Count); 241foreach (var project in workspace.CurrentSolution.Projects) 285Assert.Equal(4, workspace.CurrentSolution.ProjectIds.Count); 290foreach (var project in workspace.CurrentSolution.Projects) 312foreach (var project in workspace.CurrentSolution.Projects) 348var projects = workspace.CurrentSolution.Projects.Where(p => p.FilePath.EndsWith("Project.csproj")); 353var referencedProject = workspace.CurrentSolution.GetProject(projectReference.ProjectId); 442Assert.Equal(2, workspace.CurrentSolution.ProjectIds.Count); 444Assert.Contains(workspace.CurrentSolution.Projects, p => p.Name == "Library(net6)"); 445Assert.Contains(workspace.CurrentSolution.Projects, p => p.Name == "Library(net5)"); 500Assert.Equal(2, workspace.CurrentSolution.ProjectIds.Count);
VisualStudioMSBuildWorkspaceTests.cs (27)
1445vbProject = workspace.CurrentSolution.GetProject(vbProject.Id); 2018var solution2 = workspace.CurrentSolution; 2038var projectB = workspaceB.CurrentSolution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2061var solution2 = workspace.CurrentSolution; 2094var solution2 = workspace.CurrentSolution; 2123var solution2 = workspace.CurrentSolution; 2150var solution2 = workspace.CurrentSolution; 2176var solution2 = workspace.CurrentSolution; 2206workspace.TryApplyChanges(workspace.CurrentSolution.AddAdditionalDocument(DocumentId.CreateNewId(csProjectId), "foo.xaml", SourceText.From("<foo></foo>"))); 2209var xaml = workspace.CurrentSolution.GetProject(csProjectId).AdditionalDocuments.FirstOrDefault(d => d.Name == "XamlFile.xaml"); 2216workspace.TryApplyChanges(workspace.CurrentSolution.RemoveAdditionalDocument(xaml.Id)); 2229var originalSolution = workspace.CurrentSolution; 2238var doc = workspace.CurrentSolution.Projects.First().Documents.First(); 2242workspace.TryApplyChanges(workspace.CurrentSolution.WithDocumentText(doc.Id, SourceText.From(newText), PreservationMode.PreserveIdentity)); 2259var originalSolution = workspace.CurrentSolution; 2268var doc = workspace.CurrentSolution.Projects.First().Documents.First(); 2274.CurrentSolution 2304Assert.Equal(2, workspace.CurrentSolution.Projects.Count()); 2334Assert.Equal(2, workspace.CurrentSolution.Projects.Count()); 2587var csproject = workspace.CurrentSolution.Projects.First(p => p.Language == LanguageNames.CSharp); 2595var vbproject = workspace.CurrentSolution.Projects.First(p => p.Language == LanguageNames.VisualBasic); 2945workspace.TryApplyChanges(workspace.CurrentSolution.GetProject(project.Id).RemoveAnalyzerReference(aref).Solution); 2966workspace.TryApplyChanges(workspace.CurrentSolution.GetProject(project.Id).RemoveProjectReference(pref).Solution); 2967Assert.Empty(workspace.CurrentSolution.GetProject(project.Id).ProjectReferences); 2973workspace.TryApplyChanges(workspace.CurrentSolution.GetProject(project.Id).AddProjectReference(pref).Solution); 2974Assert.Single(workspace.CurrentSolution.GetProject(project.Id).ProjectReferences); 3290Assert.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)
535var document = await CurrentSolution.GetSourceGeneratedDocumentAsync(documentId, CancellationToken.None); 542return ChangeDocumentAsync(documentId, this.CurrentSolution.WithDocumentText(documentId, text)); 556var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.CurrentSolution.AddDocument(documentInfo)); 563var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.CurrentSolution.WithAdditionalDocumentText(documentId, text)); 570var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.CurrentSolution.WithAnalyzerConfigDocumentText(documentId, text)); 804foreach (var analyzer in this.CurrentSolution.AnalyzerReferences)
Microsoft.CodeAnalysis.Workspaces.UnitTests (332)
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)
96solution = workspace.CurrentSolution 111solution = 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)
58Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution 80Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution 117var solution = workspace.CurrentSolution; 126var solution = workspace.CurrentSolution; 136var solution = workspace.CurrentSolution; 145var solution = workspace.CurrentSolution; 155var solution = workspace.CurrentSolution; 164var solution = workspace.CurrentSolution; 174var solution = workspace.CurrentSolution; 194var solution = workspace.CurrentSolution; 225var solution = workspace.CurrentSolution; 252var solution = workspace.CurrentSolution; 271var solution = workspace.CurrentSolution; 290var solution = workspace.CurrentSolution; 301var solution = workspace.CurrentSolution; 331var solution = workspace.CurrentSolution 347var solution = workspace.CurrentSolution; 372var solution = workspace.CurrentSolution; 396var solution = workspace.CurrentSolution; 429var solution = workspace.CurrentSolution; 476solution = workspace.CurrentSolution; 517var solution = workspace.CurrentSolution; 564solution = workspace.CurrentSolution; 596var solution = workspace.CurrentSolution; 650solution = workspace.CurrentSolution; 682var solution = workspace.CurrentSolution; 730solution = workspace.CurrentSolution; 759var solution = workspace.CurrentSolution; 806solution = workspace.CurrentSolution; 841Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution 847var solution = workspace.CurrentSolution; 895solution = workspace.CurrentSolution; 918var solution = workspace.CurrentSolution; 940var solution = workspace.CurrentSolution; 964var solution = workspace.CurrentSolution; 986var solution = workspace.CurrentSolution; 1010var solution = workspace.CurrentSolution; 1032var solution = workspace.CurrentSolution; 1054var solution = workspace.CurrentSolution; 1090var solution = workspace.CurrentSolution 1299var solution = workspace.CurrentSolution 1334var solution = workspace.CurrentSolution 1369var solution = workspace.CurrentSolution 1404var solution = workspace.CurrentSolution 1438var solution = workspace.CurrentSolution 1460var solution = workspace.CurrentSolution 1488var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp); 1515var solution = workspace.CurrentSolution 1538var solution = workspace.CurrentSolution 1561var solution = workspace.CurrentSolution. 1584var solution = workspace.CurrentSolution. 1621var solution = workspace.CurrentSolution 1675var solution = workspace.CurrentSolution 1698var solution = workspace.CurrentSolution 1721var solution = workspace.CurrentSolution 1738var solution = workspace.CurrentSolution 1763var solution = workspace.CurrentSolution 1787var document = workspace.CurrentSolution 1821var document = workspace.CurrentSolution 1859var document = workspace.CurrentSolution 1878var document = workspace.CurrentSolution 1897var document = workspace.CurrentSolution 1913var solution = workspace.CurrentSolution; 1946var solution = workspace.CurrentSolution; 1962var solution = workspace.CurrentSolution; 2004var solution = workspace.CurrentSolution; 2039var solution = workspace.CurrentSolution; 2075var solution = workspace.CurrentSolution; 2093var solution = workspace.CurrentSolution; 2118var solution = workspace.CurrentSolution; 2145var solution = workspace.CurrentSolution; 2163var solution = workspace.CurrentSolution; 2191var solution = workspace.CurrentSolution; 2218var solution = workspace.CurrentSolution; 2232var solution = workspace.CurrentSolution; 2258var solution = workspace.CurrentSolution; 2285var solution = workspace.CurrentSolution; 2304TestOptionValues(workspace.CurrentSolution, expectedA: "A", hasBWithoutFallback: false, expectedB: "fallbackY", expectedBFile: "fallbackY"); 2361var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2387var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2417var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2446var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2475var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2506var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 2529var solution = workspace.CurrentSolution; 2542var solution = workspace.CurrentSolution; 2554var solution = workspace.CurrentSolution; 2569var solution = workspace.CurrentSolution 2615var solution = workspace.CurrentSolution 2639var solution = workspace.CurrentSolution 2667var solution = workspace.CurrentSolution 2677var solution = workspace.CurrentSolution; 2691var solution = workspace.CurrentSolution 2712var solution = workspace.CurrentSolution 2733var solution = workspace.CurrentSolution 2752var solution = workspace.CurrentSolution 2771var solution = workspace.CurrentSolution 2786var solution = workspace.CurrentSolution 2805var solution = workspace.CurrentSolution 2822var solution = workspace.CurrentSolution 2922var solution = workspace.CurrentSolution; 2943var solution = workspace.CurrentSolution; 2981var solution = workspace.CurrentSolution; 3039var solution = workspace.CurrentSolution; 3057var sol = workspace.CurrentSolution; 3076var sol = workspace.CurrentSolution; 3102var sol = workspace.CurrentSolution; 3138var sol = workspace.CurrentSolution 3159var solution1 = workspace.CurrentSolution 3182var sol = workspace.CurrentSolution 3223var sol = workspace.CurrentSolution 3264var solution = workspace.CurrentSolution 3295var sol = workspace.CurrentSolution; 3326var sol = workspace.CurrentSolution 3348var sol = workspace.CurrentSolution 3369var sol = workspace.CurrentSolution 3393var sol = workspace.CurrentSolution 3415var sol = workspace.CurrentSolution 3436var sol = workspace.CurrentSolution 3456var sol = workspace.CurrentSolution 3476var sol = workspace.CurrentSolution 3496var sol = workspace.CurrentSolution 3515var sol = workspace.CurrentSolution 3546var sol = workspace.CurrentSolution 3578var sol = workspace.CurrentSolution 3604var sol = workspace.CurrentSolution 3638var sol = workspace.CurrentSolution 3668var sol = workspace.CurrentSolution 3719var sol = workspace.CurrentSolution 3744var sol = workspace.CurrentSolution 3771var sol = workspace.CurrentSolution 3905var solution = workspace.CurrentSolution; 3958var solution = new AdhocWorkspace().CurrentSolution 4073var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4098var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4126var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4171var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4249var project = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4267var project = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4283var originalProject = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4307var originalProject = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4335var document = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4351var solution = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp).Solution; 4407var currentSolution = workspace.CurrentSolution; 4547var solution = workspace.CurrentSolution; 4563var solution = workspace.CurrentSolution; 4634var solution = workspace.CurrentSolution; 4671var solution = workspace.CurrentSolution; 4707var solution = workspace.CurrentSolution; 4748var solution = workspace.CurrentSolution; 4794var solution = workspace.CurrentSolution; 4825var solution = workspace.CurrentSolution; 4935var solution = workspace.CurrentSolution; 4958var solution = workspace.CurrentSolution; 4980var solution = workspace.CurrentSolution; 5008var solution = workspace.CurrentSolution; 5036var solution = workspace.CurrentSolution; 5065var solution = workspace.CurrentSolution; 5096var solution = workspace.CurrentSolution; 5134var solution = workspace.CurrentSolution; 5151var solution = workspace.CurrentSolution; 5197var solution = workspace.CurrentSolution; 5241var solution = workspace.CurrentSolution; 5265var solution = workspace.CurrentSolution; 5386var s0 = workspace.CurrentSolution; 5432var solution = workspace.CurrentSolution.AddProject(projInfo); 5461var solution = workspace.CurrentSolution; 5515var solution = workspace.CurrentSolution 5543var solution = workspace.CurrentSolution 5563var solution = workspace.CurrentSolution 5577var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 5594var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 5614var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5642var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5672var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5705var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5730var project1 = workspace.CurrentSolution 5782var project = workspace.CurrentSolution.AddProject("TypeScript", "TypeScript", "TypeScript"); 5803var project1 = workspace.CurrentSolution 5836var document1 = workspace.CurrentSolution.GetRequiredDocument(documentId1); 5842var document2 = workspace.CurrentSolution.GetRequiredDocument(documentId2);
SolutionTests\SolutionWithSourceGeneratorTests.cs (37)
49var project = AddEmptyProject(workspace.CurrentSolution) 90var project = AddEmptyProject(workspace.CurrentSolution) 138var project = AddEmptyProject(workspace.CurrentSolution) 165var project = AddEmptyProject(workspace.CurrentSolution) 254var project = AddEmptyProject(workspace.CurrentSolution) 294var project = AddEmptyProject(workspace.CurrentSolution) 338var project = AddEmptyProject(workspace.CurrentSolution) 366var projectBeforeChange = AddEmptyProject(workspace.CurrentSolution) 389var solutionWithProjects = AddProjectWithReference(workspace.CurrentSolution, analyzerReference); 419var solution = AddEmptyProject(workspace.CurrentSolution) 444var project = AddEmptyProject(workspace.CurrentSolution) 458var project = AddEmptyProject(workspace.CurrentSolution) 481var project = AddEmptyProject(workspace.CurrentSolution) 501var project = AddEmptyProject(workspace.CurrentSolution) 528var project = AddEmptyProject(workspace.CurrentSolution) 576var project = AddEmptyProject(workspace.CurrentSolution); 589var project = AddEmptyProject(workspace.CurrentSolution) 601Assert.NotSame(workspace.CurrentSolution, generatedDocument.Project.Solution); 613var project = AddEmptyProject(workspace.CurrentSolution) 618var generatedDocument = Assert.Single(await workspace.CurrentSolution.Projects.Single().GetSourceGeneratedDocumentsAsync()); 624Assert.Same(workspace.CurrentSolution, generatedDocument!.Project.Solution); 632var originalAdditionalFile = AddEmptyProject(workspace.CurrentSolution) 645Assert.Empty(await workspace.CurrentSolution.Projects.Single().GetSourceGeneratedDocumentsAsync()); 660var solution = AddEmptyProject(workspace.CurrentSolution) 669var generatedDocument = Assert.Single(await workspace.CurrentSolution.GetRequiredProject(projectIdWithGenerator).GetSourceGeneratedDocumentsAsync()); 691var project = AddEmptyProject(workspace.CurrentSolution) 703var document = await workspace.CurrentSolution.GetSourceGeneratedDocumentAsync(generatedDocument.Identity.DocumentId, CancellationToken.None); 719var project = AddEmptyProject(workspace.CurrentSolution) 725var documentToFreeze = workspace.CurrentSolution.Projects.Single().Documents.Single(); 750var project = AddEmptyProject(workspace.CurrentSolution) 779var project = AddEmptyProject(workspace.CurrentSolution) 809var originalDocument1 = AddEmptyProject(workspace.CurrentSolution, name: "Project1") 847var project = AddEmptyProject(workspace.CurrentSolution); 871var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference); 904var solution = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference).Solution; 929var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference); 949var project0 = AddEmptyProject(workspace.CurrentSolution);
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)
73var newSolution1 = workspace1.CurrentSolution.WithOptions(newSet); 78var oldSolution2 = workspace2.CurrentSolution; 84var newSolution2 = workspace2.CurrentSolution; 104var newSolution1 = workspace1.CurrentSolution.WithOptions(newSet); 108var oldSolution2 = workspace2.CurrentSolution; 113Assert.Equal("EOLN", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 114Assert.Equal("EOLN", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 120Assert.Equal("EOLN", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 121Assert.Equal("EOLN", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 128Assert.Equal("NEW_LINE", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 129Assert.Equal("NEW_LINE", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 134Assert.Equal("NEW_LINE", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 135Assert.Equal("NEW_LINE", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 139Assert.Equal("NEW_LINE2", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 140Assert.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 (96)
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 (5)
64var solution = _workspace.CurrentSolution; 81var solution = _workspace.CurrentSolution; 107var solution = _workspace.CurrentSolution; 129var solution = _workspace.CurrentSolution; 229return _workspace.CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask();
DesignerAttribute\VisualStudioDesignerAttributeService.cs (1)
115var solution = _workspace.CurrentSolution;
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (4)
93var currentSolution = _workspace.CurrentSolution; 193command.Text = GetBackgroundAnalysisScope(_workspace.CurrentSolution, _globalOptions) switch 309var solution = _workspace.CurrentSolution; 356return _workspace.CurrentSolution.GetProject(projectId);
Diagnostics\VisualStudioVenusSpanMappingService.cs (1)
87var solution = _workspace.CurrentSolution;
EditorConfigSettings\SettingsEditorControl.xaml.cs (1)
83var solution = _workspace.CurrentSolution;
EditorConfigSettings\SettingsEditorFactory.cs (2)
84if (!_workspace.CurrentSolution.Projects.Any(p => p.Language is LanguageNames.CSharp or LanguageNames.VisualBasic)) 91if (!_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\AbstractEditorFactory.cs (1)
295var solution = workspace.CurrentSolution;
Implementation\HierarchyItemToProjectIdMap.cs (1)
37var candidateProjects = _workspace.CurrentSolution.Projects
Implementation\VisualStudioSupportsFeatureService.cs (1)
59return SupportsRenameWorker(workspace.CurrentSolution.GetRelatedDocumentIds(documentId));
Implementation\VsRefactorNotifyService.cs (1)
191var 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)
194var 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)
480var solution = Workspace.CurrentSolution;
Progression\GraphQueryManager.cs (2)
59var solution = _workspace.CurrentSolution; 100var 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)
296var document = _threadingContext.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask()); 321var currentSolution = this.CurrentSolution; 494var originalProject = CurrentSolution.GetRequiredProject(projectId); 512var parseOptionsService = CurrentSolution.GetRequiredProject(projectId).Services.GetRequiredService<IParseOptionsChangingService>(); 915if (CurrentSolution.FilePath is null || documentInfo.FilePath is null) 924var solutionDirectory = PathUtilities.GetDirectoryName(this.CurrentSolution.FilePath); 930if (PathUtilities.GetDirectoryName(CurrentSolution.GetProject(documentInfo.Id.ProjectId)?.FilePath) == solutionDirectory) 1008var document = this.CurrentSolution.GetTextDocument(documentId); 1089var document = this.CurrentSolution.GetTextDocument(documentId); 1204var textBuffer = this.CurrentSolution.GetTextDocument(documentId)!.GetTextSynchronously(CancellationToken.None).Container.TryGetTextBuffer(); 1221var document = CurrentSolution.GetRequiredDocument(documentId); 1315return CurrentSolution.GetRequiredProject(documentId.ProjectId).Language switch 1589uiContext.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);
StackTraceExplorer\StackFrameViewModel.cs (2)
218(_cachedDocument, _cachedLineNumber) = _stackExplorerService.GetDocumentAndLine(_workspace.CurrentSolution, _frame); 229_definitionCache[symbolPart] = await _stackExplorerService.TryFindDefinitionAsync(_workspace.CurrentSolution, _frame, symbolPart, cancellationToken).ConfigureAwait(false);
SyncNamespaces\SyncNamespacesCommandHandler.cs (5)
79visible = _workspace.CurrentSolution.Projects 108var projects = _workspace.CurrentSolution.Projects 120var solution = _workspace.CurrentSolution; 146if (_workspace.CurrentSolution.GetChanges(solution).GetProjectChanges().Any()) 156oldSolution: _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)
88var project = _workspace.CurrentSolution.GetProject(_projectId); 133return _workspace.CurrentSolution.GetDocumentIdsWithFilePath(filePath) 318if (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)
155if (Workspace.CurrentSolution.ContainsDocument(ContainedDocument.Id))
Workspace\GlobalUndoServiceFactory.WorkspaceGlobalUndoTransaction.cs (1)
64var solution = visualStudioWorkspace.CurrentSolution;
Workspace\SourceGeneratedFileManager.cs (1)
334var 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; 265var 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 (12)
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 (1)
99var solution = workspace.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 (15)
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) 125Assert.Empty(environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences) 130Assert.Empty(environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences) 145}, environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath)) 159}, environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath)) 169}, environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath)) 179}, environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath)) 204AssertEx.Equal({path1, path2}, environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath)) 227Assert.Empty(environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences) 236}, environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath)) 268Assert.Empty(environment.Workspace.CurrentSolution.Projects.Single().AnalyzerReferences) 277}, 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 (12)
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) 242workspace.CurrentSolution, projectId:=Nothing, documentId:=document.Id, diagnosticIds:=Nothing, shouldIncludeAnalyzer:=Nothing, 277Dim mappedDocument = testWorkspace.CurrentSolution.GetDocument(mappedTestDocument.Id) 315Dim 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 (63)
Remote\RemoteHostClientServiceFactoryTests.cs (1)
64Assert.True(workspace.CurrentSolution.CompilationState.TryGetStateChecksums(out _));
Services\AssetProviderTests.cs (3)
74var solution = workspace.CurrentSolution; 102var solution = workspace.CurrentSolution; 127var project = workspace.CurrentSolution.Projects.First();
Services\ServiceHubServicesTests.cs (14)
56var solution = workspace.CurrentSolution; 78var solution = workspace.CurrentSolution; 133var solution = workspace.CurrentSolution; 184var solution = workspace.CurrentSolution; 195workspace.CurrentSolution, 196workspace.CurrentSolution.Projects.Single().Documents.Single(), 255var solution = workspace.CurrentSolution; 300var solution = workspace.CurrentSolution; 320solution = workspace.CurrentSolution; 334solution = workspace.CurrentSolution; 768var project = workspace.CurrentSolution 1477var remoteSolution = remoteWorkspace.CurrentSolution; 1513solution = localWorkspace.CurrentSolution; 1516var currentRemoteSolution = remoteWorkspace.CurrentSolution;
Services\SolutionAssetCacheTests.cs (1)
74var solution = workspace.CurrentSolution;
Services\SolutionServiceTests.cs (35)
51var solution = workspace.CurrentSolution; 68var solution = workspace.CurrentSolution; 91var assetProvider = await GetAssetProviderAsync(workspace, remoteWorkspace, workspace.CurrentSolution); 93var solutionChecksum = await workspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None); 120var assetProvider = await GetAssetProviderAsync(workspace, remoteWorkspace, workspace.CurrentSolution); 122var solutionChecksum = await workspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None); 143var solution = workspace.CurrentSolution; 331var projectId = workspace.CurrentSolution.ProjectIds.First(); 362var projectId = workspace.CurrentSolution.ProjectIds.First(); 395var projectId = workspace.CurrentSolution.ProjectIds.First(); 429var solution1 = workspace.CurrentSolution; 479Assert.Equal(remoteSolution, remoteWorkspace.CurrentSolution); 489var solution = workspace.CurrentSolution; 509var solution = workspace.CurrentSolution 548var solution = workspace.CurrentSolution; 589var solution = workspace.CurrentSolution; 630var solution = workspace.CurrentSolution; 663var solution = workspace.CurrentSolution; 704var solution = workspace.CurrentSolution; 744var solution = workspace.CurrentSolution; 784var solution = workspace.CurrentSolution; 817var solution = workspace.CurrentSolution; 872var solution = workspace.CurrentSolution; 918var solution = workspace.CurrentSolution; 941var solution = workspace.CurrentSolution; 961solution = workspace.CurrentSolution; 986var solution = workspace.CurrentSolution; 1005var solution = workspace.CurrentSolution; 1037var solution = workspace.CurrentSolution; 1075var solution = workspace.CurrentSolution; 1101var solution = workspace.CurrentSolution; 1128var solution = workspace.CurrentSolution; 1157var solution = workspace.CurrentSolution; 1204var solution = workspace.CurrentSolution; 1280var solution = workspace.CurrentSolution;
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (9)
50var analyzerResult = await AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer); 58analyzerResult = await AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer); 81var analyzerResult = await AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer); 97analyzerResult = await AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer); 119var task = Task.Run(() => AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer: false, source.Token)); 153workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 158var project = workspace.CurrentSolution.Projects.First(); 196var project = workspace.CurrentSolution.Projects.First().AddAnalyzerReference(analyzerReference); 223var solution = workspace.CurrentSolution;