1 write to NewProject
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\ProjectChanges.cs (1)
14NewProject = newProject;
63 references to NewProject
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
116return projectChanges[0].NewProject.GetDocument(document.Id);
Microsoft.CodeAnalysis.EditorFeatures (2)
Preview\AbstractPreviewFactoryService.cs (2)
90var newProject = projectChanges.NewProject; 229var newProjectReferences = projectChanges.NewProject.ProjectReferences.ToDictionary(r => r.ProjectId);
Microsoft.CodeAnalysis.Features (4)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (4)
418await EnqueueDocumentWorkItemAsync(projectChanges.NewProject, addedDocumentId, document: null, UnitTestingInvocationReasons.DocumentAdded).ConfigureAwait(false); 422await EnqueueChangedDocumentWorkItemAsync(projectChanges.OldProject.GetRequiredDocument(changedDocumentId), projectChanges.NewProject.GetRequiredDocument(changedDocumentId)) 433var newProject = projectChanges.NewProject; 460await EnqueueFullProjectWorkItemAsync(projectChanges.NewProject, projectConfigurationChange).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces (45)
CodeActions\Operations\ApplyChangesOperation.cs (1)
128var changedDocument = changedProject.NewProject.Solution.GetRequiredTextDocument(documentId);
Workspace\Solution\ProjectChanges.cs (23)
18public ProjectId ProjectId => NewProject.Id; 27foreach (var reference in NewProject.ProjectReferences) 38var newRefs = new HashSet<ProjectReference>(NewProject.ProjectReferences); 51foreach (var metadata in NewProject.MetadataReferences) 62var newMetadata = new HashSet<MetadataReference>(NewProject.MetadataReferences); 75foreach (var analyzerReference in NewProject.AnalyzerReferences) 86var newAnalyzerReferences = new HashSet<AnalyzerReference>(NewProject.AnalyzerReferences); 97/// Get <see cref="DocumentId"/>s of added documents in the order they appear in <see cref="Project.DocumentIds"/> of the <see cref="NewProject"/>. 100=> NewProject.State.DocumentStates.GetAddedStateIds(OldProject.State.DocumentStates); 103/// Get <see cref="DocumentId"/>s of added dditional documents in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 106=> NewProject.State.AdditionalDocumentStates.GetAddedStateIds(OldProject.State.AdditionalDocumentStates); 109/// Get <see cref="DocumentId"/>s of added analyzer config documents in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 112=> NewProject.State.AnalyzerConfigDocumentStates.GetAddedStateIds(OldProject.State.AnalyzerConfigDocumentStates); 116/// in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 122/// Get changed documents in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 130=> NewProject.State.DocumentStates.GetChangedStateIds(OldProject.State.DocumentStates, onlyGetDocumentsWithTextChanges, ignoreUnchangeableDocuments); 134/// in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 137=> NewProject.State.AdditionalDocumentStates.GetChangedStateIds(OldProject.State.AdditionalDocumentStates); 141/// in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 144=> NewProject.State.AnalyzerConfigDocumentStates.GetChangedStateIds(OldProject.State.AnalyzerConfigDocumentStates); 150=> NewProject.State.DocumentStates.GetRemovedStateIds(OldProject.State.DocumentStates); 156=> NewProject.State.AdditionalDocumentStates.GetRemovedStateIds(OldProject.State.AdditionalDocumentStates); 162=> NewProject.State.AnalyzerConfigDocumentStates.GetRemovedStateIds(OldProject.State.AnalyzerConfigDocumentStates);
Workspace\Workspace.cs (21)
313if (!projectChanges.NewProject.SupportsCompilation) 1577progressTracker.Report(CodeAnalysisProgress.Description(string.Format(WorkspacesResources.Applying_changes_to_0, projectChanges.NewProject.Name))); 1632var newDoc = projectChange.NewProject.GetRequiredDocument(docId); 1696projectChanges.OldProject.CompilationOptions != projectChanges.NewProject.CompilationOptions) 1703Contract.ThrowIfNull(projectChanges.NewProject.CompilationOptions); 1710projectChanges.NewProject.CompilationOptions.WithSyntaxTreeOptionsProvider( 1719if (!CanApplyCompilationOptionChange(projectChanges.OldProject.CompilationOptions, newOptionsWithoutSyntaxTreeOptionsChange, projectChanges.NewProject)) 1727projectChanges.OldProject.ParseOptions != projectChanges.NewProject.ParseOptions && 1728!CanApplyParseOptionChange(projectChanges.OldProject.ParseOptions!, projectChanges.NewProject.ParseOptions!, projectChanges.NewProject)) 1744&& projectChanges.GetChangedDocuments().Any(id => projectChanges.NewProject.GetDocument(id)!.HasInfoChanged(projectChanges.OldProject.GetDocument(id)!))) 1760projectChanges.NewProject.State.DocumentStates.GetState(documentId)!; 1871projectChanges.NewProject.CompilationOptions?.WithSyntaxTreeOptionsProvider( 1879if (projectChanges.OldProject.ParseOptions != projectChanges.NewProject.ParseOptions) 1881this.ApplyParseOptionsChanged(projectChanges.ProjectId, projectChanges.NewProject.ParseOptions!); 1941var document = projectChanges.NewProject.GetDocument(documentId)!; 1950var document = projectChanges.NewProject.GetAdditionalDocument(documentId)!; 1959var document = projectChanges.NewProject.GetAnalyzerConfigDocument(documentId)!; 1974var newDoc = projectChanges.NewProject.GetAdditionalDocument(documentId)!; 1984var newDoc = projectChanges.NewProject.GetAnalyzerConfigDocument(documentId)!; 1996var newDoc = projectChanges.NewProject.GetDocument(documentId)!;
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildWorkspace.cs (1)
333var project = projectChanges.OldProject ?? projectChanges.NewProject;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (8)
SolutionUtilities.cs (2)
36return solutionDifferences.GetProjectChanges().Select(n => n.NewProject.GetChanges(n.OldProject)); 102return Tuple.Create(projectChanges.NewProject, projectChanges.GetAddedProjectReferences().Single());
Workspaces\TestWorkspace`1.cs (6)
467if (projectChanges.OldProject.FilePath != projectChanges.NewProject.FilePath) 469var hostProject = this.GetTestProject(projectChanges.NewProject.Id); 472hostProject.OnProjectFilePathChanged(projectChanges.NewProject.FilePath); 473base.OnProjectNameChanged(projectChanges.NewProject.Id, projectChanges.NewProject.Name, projectChanges.NewProject.FilePath);
Microsoft.VisualStudio.LanguageServices (2)
Preview\ReferenceChange.cs (1)
32var newSolution = projectChanges.NewProject.Solution;
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
668var newDocument = projectChanges.NewProject.GetRequiredDocument(changedDocumentId);