114 references to CurrentSolution
dotnet-format (4)
CodeFormatter.cs (2)
51
foreach (var project in workspace.
CurrentSolution
.Projects)
63
var solution = workspace.
CurrentSolution
;
Workspaces\FolderWorkspace.cs (2)
43
return
CurrentSolution
;
54
var document =
CurrentSolution
.GetDocument(documentId);
Microsoft.CodeAnalysis.ExternalAccess.HotReload (2)
Api\HotReloadMSBuildWorkspace.cs (2)
75
var oldSolution =
CurrentSolution
;
151
var updatedSolution =
CurrentSolution
;
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Options\OmniSharpSolutionAnalyzerConfigOptionsUpdater.cs (1)
23
var oldSolution = workspace.
CurrentSolution
;
Microsoft.CodeAnalysis.Features (18)
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (2)
110
var newSolution = workspace.
CurrentSolution
.WithDocumentText(
122
var rolledBackSolution = workspace.
CurrentSolution
.WithDocumentText(
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
37
/// cref="Workspace.
CurrentSolution
"/> normally represents.
ExternalAccess\UnitTesting\UnitTestingStackTraceServiceAccessor.cs (2)
23
=> _stackTraceExplorerService.GetDocumentAndLine(workspace.
CurrentSolution
, parsedFrame.UnderlyingObject);
38
var definition = await _stackTraceExplorerService.TryFindDefinitionAsync(workspace.
CurrentSolution
, parsedFrame.UnderlyingObject, StackFrameSymbolPart.Method, cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
44
var (project, symbol) = await TryResolveSymbolAsync(workspace.
CurrentSolution
, symbolKey, cancellationToken).ConfigureAwait(false);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (6)
66
metadataWorkspace.OnSolutionFallbackAnalyzerOptionsChanged(sourceWorkspace.
CurrentSolution
.FallbackAnalyzerOptions);
104
var (temporaryProjectInfo, temporaryDocumentId) = GenerateProjectAndDocumentInfo(fileInfo, metadataWorkspace.
CurrentSolution
.Services, sourceProject, topLevelNamedType);
105
var temporarySolution = metadataWorkspace.
CurrentSolution
.AddProject(temporaryProjectInfo);
212
var document = metadataWorkspace.
CurrentSolution
.GetRequiredDocument(generatedDocumentId);
230
var newLoader = new WorkspaceFileTextLoader(metadataWorkspace.
CurrentSolution
.Services, fileInfo.TemporaryFilePath, MetadataAsSourceGeneratedFileInfo.Encoding);
305
var solution = fileInfo.Workspace.
CurrentSolution
;
MetadataAsSource\MetadataAsSourceFileService.cs (2)
181
documentId = workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(filePath).SingleOrDefault();
203
var documentId = workspace.
CurrentSolution
.GetDocumentIdsWithFilePath(filePath).FirstOrDefault();
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (4)
258
var navigateProject = metadataWorkspace.
CurrentSolution
.GetRequiredProject(projectId);
265
if (!metadataWorkspace.
CurrentSolution
.ContainsDocument(documentInfo.Id))
272
navigateProject = metadataWorkspace.
CurrentSolution
.GetRequiredProject(projectId);
396
var solution = info.SourceWorkspace.
CurrentSolution
;
Microsoft.CodeAnalysis.Features.ExternalAccess (2)
Copilot\Internal\SemanticSearch\CopilotSemanticSearchQueryExecutor.cs (2)
86
var services = _workspace.
CurrentSolution
.Services;
117
_workspace.
CurrentSolution
,
Microsoft.CodeAnalysis.Workspaces (70)
CodeActions\CodeAction_Cleanup.cs (1)
102
originalSolution ??= changedSolution.Workspace.
CurrentSolution
;
CodeActions\Operations\ApplyChangesOperation.cs (1)
53
var currentSolution = workspace.
CurrentSolution
;
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (2)
119
var solution = _workspace.
CurrentSolution
;
241
foreach (var projectId in service._workspace.
CurrentSolution
.ProjectIds)
Formatting\Formatter.cs (1)
320
return syntaxFormattingService.GetFormattingOptions(optionSet ?? workspace.
CurrentSolution
.Options);
Recommendations\Recommender.cs (1)
26
var solution = workspace.
CurrentSolution
;
Workspace\AdhocWorkspace.cs (9)
57
return this.
CurrentSolution
;
83
return this.
CurrentSolution
.GetProject(projectInfo.Id);
143
return this.
CurrentSolution
.GetDocument(documentInfo.Id);
151
var doc = this.
CurrentSolution
.GetDocument(documentId);
164
var doc = this.
CurrentSolution
.GetDocument(documentId);
179
var doc = this.
CurrentSolution
.GetAdditionalDocument(documentId);
192
var doc = this.
CurrentSolution
.GetAdditionalDocument(documentId);
207
var doc = this.
CurrentSolution
.GetAnalyzerConfigDocument(documentId);
220
var doc = this.
CurrentSolution
.GetAnalyzerConfigDocument(documentId);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (2)
219
if (_documentAlreadyInWorkspace(_project._projectSystemProjectFactory.Workspace.
CurrentSolution
, documentId))
271
if (_project._projectSystemProjectFactory.Workspace.
CurrentSolution
.GetDocument(documentId) != null)
Workspace\ProjectSystem\ProjectSystemProject.cs (7)
252
TryReportCompilationThrownAway(_projectSystemProjectFactory.Workspace.
CurrentSolution
, Id);
485
private bool HasBeenRemoved => !_projectSystemProjectFactory.Workspace.
CurrentSolution
.ContainsProject(Id);
1166
return _projectSystemProjectFactory.Workspace.
CurrentSolution
.GetRequiredProject(Id).AllProjectReferences.Contains(projectReference);
1174
var projectReferencesInWorkspace = _projectSystemProjectFactory.Workspace.
CurrentSolution
.GetRequiredProject(Id).AllProjectReferences;
1219
if (!_projectSystemProjectFactory.Workspace.
CurrentSolution
.ContainsProject(Id))
1245
var project = w.
CurrentSolution
.GetRequiredProject(Id);
1251
if (w.
CurrentSolution
.ProjectIds.Count == 1)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (2)
149
analyzerReferences: w.
CurrentSolution
.AnalyzerReferences).WithTelemetryId(SolutionTelemetryId);
402
project = Workspace.
CurrentSolution
.GetRequiredProject(projectId);
Workspace\TextExtensions.cs (4)
26
var solution = workspace.
CurrentSolution
;
62
var solution = workspace.
CurrentSolution
;
109
var solution = workspace.
CurrentSolution
;
130
return workspace.
CurrentSolution
.GetDocument(id);
Workspace\Workspace_Editor.cs (2)
213
/// Gets the ids for documents in the <see cref="
CurrentSolution
"/> snapshot associated with the given <paramref name="container"/>.
229
return
CurrentSolution
.GetRelatedDocumentIds(documentId);
Workspace\Workspace_Events.cs (1)
175
var currentSolution = this.
CurrentSolution
;
Workspace\Workspace.cs (37)
160
/// Sets the <see cref="
CurrentSolution
"/> of this workspace. This method does not raise a WorkspaceChange event.
170
/// Sets the <see cref="
CurrentSolution
"/> of this workspace. This method does not raise a
185
var oldSolution = this.
CurrentSolution
;
215
/// Applies specified transformation to <see cref="
CurrentSolution
"/>, updates <see cref="
CurrentSolution
"/> to
225
/// <returns>True if <see cref="
CurrentSolution
"/> was set to the transformed solution, false if the
420
/// Applies specified transformation to <see cref="
CurrentSolution
"/>, updates <see cref="
CurrentSolution
"/> to
431
/// <param name="onBeforeUpdate">Action to perform immediately prior to updating <see cref="
CurrentSolution
"/>.
432
/// The action will be passed the old <see cref="
CurrentSolution
"/> that will be replaced and the exact solution
436
/// <param name="onAfterUpdate">Action to perform once <see cref="
CurrentSolution
"/> has been updated. The
437
/// action will be passed the old <see cref="
CurrentSolution
"/> that was just replaced and the exact solution it
527
/// Setter also force updates the <see cref="
CurrentSolution
"/> to have the updated <see cref="Solution.Options"/>.
533
return this.
CurrentSolution
.Options;
1532
var oldSolution = this.
CurrentSolution
;
1590
if (
CurrentSolution
.FallbackAnalyzerOptions != newSolution.FallbackAnalyzerOptions)
1595
if (!
CurrentSolution
.AnalyzerReferences.SequenceEqual(newSolution.AnalyzerReferences))
2079
var oldProject =
CurrentSolution
.GetRequiredProject(projectId);
2097
var oldProject =
CurrentSolution
.GetRequiredProject(projectId);
2311
=> CheckSolutionIsEmpty(this.
CurrentSolution
);
2325
=> CheckProjectIsInSolution(this.
CurrentSolution
, projectId);
2341
=> CheckProjectIsNotInSolution(this.
CurrentSolution
, projectId);
2358
if (!this.
CurrentSolution
.GetProject(fromProjectId)!.ProjectReferences.Contains(projectReference))
2371
if (this.
CurrentSolution
.GetProject(fromProjectId)!.ProjectReferences.Contains(projectReference))
2384
var transitiveReferences = this.
CurrentSolution
.GetProjectDependencyGraph().GetProjectsThatThisProjectTransitivelyDependsOn(toProjectId);
2398
if (!this.
CurrentSolution
.GetProject(projectId)!.MetadataReferences.Contains(metadataReference))
2409
if (this.
CurrentSolution
.GetProject(projectId)!.MetadataReferences.Contains(metadataReference))
2420
if (!this.
CurrentSolution
.GetProject(projectId)!.AnalyzerReferences.Contains(analyzerReference))
2431
if (this.
CurrentSolution
.GetProject(projectId)!.AnalyzerReferences.Contains(analyzerReference))
2463
=> CheckDocumentIsInSolution(this.
CurrentSolution
, documentId);
2479
=> CheckAdditionalDocumentIsInSolution(this.
CurrentSolution
, documentId);
2495
=> CheckAnalyzerConfigDocumentIsInSolution(this.
CurrentSolution
, documentId);
2512
if (this.
CurrentSolution
.ContainsDocument(documentId))
2524
=> CheckAdditionalDocumentIsNotInSolution(this.
CurrentSolution
, documentId);
2540
=> CheckAnalyzerConfigDocumentIsNotInSolution(this.
CurrentSolution
, documentId);
2557
var project = this.
CurrentSolution
.GetProject(projectId);
2567
var document = this.
CurrentSolution
.GetTextDocument(documentId);
Microsoft.CodeAnalysis.Workspaces.MSBuild (12)
MSBuild\MSBuildWorkspace.cs (11)
221
return this.
CurrentSolution
;
259
var projectMap = ProjectMap.Create(this.
CurrentSolution
);
270
var projectResult = this.
CurrentSolution
.GetProject(projects[0].Id);
414
var document = this.
CurrentSolution
.GetDocument(documentId);
432
var document = this.
CurrentSolution
.GetAdditionalDocument(documentId);
480
var project = this.
CurrentSolution
.GetRequiredProject(info.Id.ProjectId);
540
var document = this.
CurrentSolution
.GetDocument(documentId);
624
var relativePath = PathUtilities.GetRelativePath(Path.GetDirectoryName(
CurrentSolution
.GetRequiredProject(projectId).FilePath)!, peRef.FilePath);
654
var project = this.
CurrentSolution
.GetProject(projectId);
679
var project = this.
CurrentSolution
.GetProject(projectReference.ProjectId);
694
var project = this.
CurrentSolution
.GetProject(projectReference.ProjectId);
MSBuild\ProjectMap.cs (1)
16
/// project into a custom <see cref="Workspace"/>. To use, pass <see cref="Workspace.
CurrentSolution
"/> to <see cref="Create(Solution)"/>.
Microsoft.DotNet.HotReload.Utils.Generator (2)
BaselineProject.cs (2)
52
workspace.
CurrentSolution
.Services,
55
return (service, workspace.
CurrentSolution
, project.Id);
Microsoft.DotNet.HotReload.Watch (3)
HotReload\ManagedCodeWorkspace.cs (3)
34
HotReloadService = new HotReloadService(_workspace.
CurrentSolution
.Services, () => ValueTask.FromResult(GetAggregateCapabilities()));
45
Solution = _workspace.
CurrentSolution
,
66
foreach (var project in _workspace.
CurrentSolution
.Projects)