113 references to CurrentSolution
dotnet-format (4)
CodeFormatter.cs (2)
49
foreach (var project in workspace.
CurrentSolution
.Projects)
62
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.Workspaces (71)
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)
122
var solution = _workspace.
CurrentSolution
;
244
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 (3)
298
if (_documentAlreadyInWorkspace(_project._projectSystemProjectFactory.Workspace.
CurrentSolution
, documentId))
350
if (_project._projectSystemProjectFactory.Workspace.
CurrentSolution
.GetDocument(documentId) != null)
506
var documentToReload = w.
CurrentSolution
.GetDocument(documentId);
Workspace\ProjectSystem\ProjectSystemProject.cs (7)
277
TryReportCompilationThrownAway(_projectSystemProjectFactory.Workspace.
CurrentSolution
, Id);
510
private bool HasBeenRemoved => !_projectSystemProjectFactory.Workspace.
CurrentSolution
.ContainsProject(Id);
1321
return _projectSystemProjectFactory.Workspace.
CurrentSolution
.GetRequiredProject(Id).AllProjectReferences.Contains(projectReference);
1329
var projectReferencesInWorkspace = _projectSystemProjectFactory.Workspace.
CurrentSolution
.GetRequiredProject(Id).AllProjectReferences;
1374
if (!_projectSystemProjectFactory.Workspace.
CurrentSolution
.ContainsProject(Id))
1408
var project = w.
CurrentSolution
.GetRequiredProject(Id);
1414
if (w.
CurrentSolution
.ProjectIds.Count == 1)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (2)
144
analyzerReferences: w.
CurrentSolution
.AnalyzerReferences).WithTelemetryId(SolutionTelemetryId);
397
project = Workspace.
CurrentSolution
.GetRequiredProject(projectId);
Workspace\TextExtensions.cs (4)
26
var solution = workspace.
CurrentSolution
;
62
var solution = workspace.
CurrentSolution
;
109
var solution = workspace.
CurrentSolution
;
130
return workspace.
CurrentSolution
.GetDocument(id);
Workspace\Workspace.cs (37)
163
/// Sets the <see cref="
CurrentSolution
"/> of this workspace. This method does not raise a WorkspaceChange event.
173
/// Sets the <see cref="
CurrentSolution
"/> of this workspace. This method does not raise a
188
var oldSolution = this.
CurrentSolution
;
218
/// Applies specified transformation to <see cref="
CurrentSolution
"/>, updates <see cref="
CurrentSolution
"/> to
228
/// <returns>True if <see cref="
CurrentSolution
"/> was set to the transformed solution, false if the
423
/// Applies specified transformation to <see cref="
CurrentSolution
"/>, updates <see cref="
CurrentSolution
"/> to
434
/// <param name="onBeforeUpdate">Action to perform immediately prior to updating <see cref="
CurrentSolution
"/>.
435
/// The action will be passed the old <see cref="
CurrentSolution
"/> that will be replaced and the exact solution
439
/// <param name="onAfterUpdate">Action to perform once <see cref="
CurrentSolution
"/> has been updated. The
440
/// action will be passed the old <see cref="
CurrentSolution
"/> that was just replaced and the exact solution it
530
/// Setter also force updates the <see cref="
CurrentSolution
"/> to have the updated <see cref="Solution.Options"/>.
536
return this.
CurrentSolution
.Options;
1535
var oldSolution = this.
CurrentSolution
;
1593
if (
CurrentSolution
.FallbackAnalyzerOptions != newSolution.FallbackAnalyzerOptions)
1598
if (!
CurrentSolution
.AnalyzerReferences.SequenceEqual(newSolution.AnalyzerReferences))
2082
var oldProject =
CurrentSolution
.GetRequiredProject(projectId);
2100
var oldProject =
CurrentSolution
.GetRequiredProject(projectId);
2314
=> CheckSolutionIsEmpty(this.
CurrentSolution
);
2328
=> CheckProjectIsInSolution(this.
CurrentSolution
, projectId);
2344
=> CheckProjectIsNotInSolution(this.
CurrentSolution
, projectId);
2361
if (!this.
CurrentSolution
.GetProject(fromProjectId)!.ProjectReferences.Contains(projectReference))
2374
if (this.
CurrentSolution
.GetProject(fromProjectId)!.ProjectReferences.Contains(projectReference))
2387
var transitiveReferences = this.
CurrentSolution
.GetProjectDependencyGraph().GetProjectsThatThisProjectTransitivelyDependsOn(toProjectId);
2401
if (!this.
CurrentSolution
.GetProject(projectId)!.MetadataReferences.Contains(metadataReference))
2412
if (this.
CurrentSolution
.GetProject(projectId)!.MetadataReferences.Contains(metadataReference))
2423
if (!this.
CurrentSolution
.GetProject(projectId)!.AnalyzerReferences.Contains(analyzerReference))
2434
if (this.
CurrentSolution
.GetProject(projectId)!.AnalyzerReferences.Contains(analyzerReference))
2466
=> CheckDocumentIsInSolution(this.
CurrentSolution
, documentId);
2482
=> CheckAdditionalDocumentIsInSolution(this.
CurrentSolution
, documentId);
2498
=> CheckAnalyzerConfigDocumentIsInSolution(this.
CurrentSolution
, documentId);
2515
if (this.
CurrentSolution
.ContainsDocument(documentId))
2527
=> CheckAdditionalDocumentIsNotInSolution(this.
CurrentSolution
, documentId);
2543
=> CheckAnalyzerConfigDocumentIsNotInSolution(this.
CurrentSolution
, documentId);
2560
var project = this.
CurrentSolution
.GetProject(projectId);
2570
var document = this.
CurrentSolution
.GetTextDocument(documentId);
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
;
Microsoft.CodeAnalysis.Workspaces.MSBuild (12)
MSBuild\MSBuildWorkspace.cs (11)
220
return this.
CurrentSolution
;
259
var projectMap = ProjectMap.Create(this.
CurrentSolution
);
270
var projectResult = this.
CurrentSolution
.GetProject(projects[0].Id);
396
var document = this.
CurrentSolution
.GetDocument(documentId);
414
var document = this.
CurrentSolution
.GetAdditionalDocument(documentId);
462
var project = this.
CurrentSolution
.GetRequiredProject(info.Id.ProjectId);
522
var document = this.
CurrentSolution
.GetDocument(documentId);
606
var relativePath = PathUtilities.GetRelativePath(Path.GetDirectoryName(
CurrentSolution
.GetRequiredProject(projectId).FilePath)!, peRef.FilePath);
636
var project = this.
CurrentSolution
.GetProject(projectId);
661
var project = this.
CurrentSolution
.GetProject(projectReference.ProjectId);
676
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\CompilationHandler.cs (3)
66
_hotReloadService = new HotReloadService(Workspace.
CurrentSolution
.Services, () => ValueTask.FromResult(GetAggregateCapabilities()));
265
if (Workspace.
CurrentSolution
is { ProjectIds: not [] } currentSolution)
349
var currentSolution = Workspace.
CurrentSolution
;