3 writes to Solution
Microsoft.CodeAnalysis.Workspaces (3)
Workspace\ProjectSystem\SolutionChangeAccumulator.cs (3)
24=> Solution = startingSolution; 43Solution = newSolution; 100Solution = newSolution;
24 references to Solution
Microsoft.CodeAnalysis.Workspaces (24)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (4)
426_documentTextLoaderChangedAction(solutionChanges.Solution, documentId, textLoader), 542newSolution: addDocuments(solutionChanges.Solution, _documentsAddedInBatch.ToImmutable()), 560solutionChanges.UpdateSolutionForRemovedDocumentAction(removeDocuments(solutionChanges.Solution, _documentsRemovedInBatch.ToImmutableArray()), 571solutionChanges.Solution.WithProjectDocumentsOrder(_project.Id, _orderedDocumentsInBatch));
Workspace\ProjectSystem\ProjectSystemProject.cs (9)
216(solutionChanges, oldValue) => solutionChanges.UpdateSolutionForProjectAction(Id, updateSolution(solutionChanges.Solution)), 310solutionChanges.UpdateSolutionForProjectAction(Id, withNewValue(solutionChanges.Solution)); 568solutionChanges.Solution.RemoveProjectReference(Id, projectReference)); 580newSolution: solutionChanges.Solution.RemoveMetadataReference(Id, metadataReference)); 609solutionChanges.Solution.AddProjectReferences(Id, projectReferencesCreated) 618newSolution: solutionChanges.Solution.AddProjectReferences(Id, _projectReferencesAddedInBatch)); 626newSolution: solutionChanges.Solution.RemoveProjectReference(Id, projectReference)); 634newSolution: solutionChanges.Solution.AddAnalyzerReferences(Id, _analyzersAddedInBatch.Select(a => a.GetReference()))); 642newSolution: solutionChanges.Solution.RemoveAnalyzerReference(Id, analyzerReference.GetReference()));
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (8)
244_ => solutionChanges.Solution, 403foreach (var projectIdToRetarget in solutionChanges.Solution.ProjectIds) 405if (CanConvertMetadataReferenceToProjectReference(solutionChanges.Solution, projectIdToRetarget, referencedProjectId: projectIdToReference)) 409foreach (PortableExecutableReference reference in solutionChanges.Solution.GetProjectState(projectIdToRetarget)!.MetadataReferences) 416var newSolution = solutionChanges.Solution.RemoveMetadataReference(projectIdToRetarget, reference) 487foreach (var projectIdToRetarget in solutionChanges.Solution.ProjectIds) 506var newSolution = solutionChanges.Solution.RemoveProjectReference(projectIdToRetarget, convertedReference.projectReference) 641var newSolution = solutionChanges.Solution.RemoveMetadataReference(project.Id, portableExecutableReference)
Workspace\ProjectSystem\SolutionChangeAccumulator.cs (3)
10/// A little helper type to hold onto the <see cref="Solution"/> being updated in a batch, which also 38if (Solution == newSolution) 95if (Solution == newSolution)