1 write to _project
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
79_project = project;
49 references to _project
Microsoft.CodeAnalysis.Workspaces (49)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (49)
29/// This class is otherwise free to operate on private members of <see cref="_project"/> if needed.</remarks> 94var documentId = DocumentId.CreateNewId(_project.Id, fullPath); 95var textLoader = _project._projectSystemProjectFactory.CreateFileTextLoader(fullPath); 104using (_project._gate.DisposableWait()) 115_project._documentWatchedFiles.Add(documentId, _project._documentFileChangeContext.EnqueueWatchingFile(fullPath)); 117if (_project._activeBatchScopes > 0) 123_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo)); 124_project._projectSystemProjectFactory.RaiseOnDocumentsAddedMaybeAsync(useAsync: false, [fullPath]).VerifyCompleted(); 144var documentId = DocumentId.CreateNewId(_project.Id, fullPath); 156using (_project._gate.DisposableWait()) 175if (_project._activeBatchScopes > 0) 181_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => 183_project._projectSystemProjectFactory.AddDocumentToDocumentsNotFromFiles_NoLock(documentInfo.Id); 195Debug.Assert(_project._gate.CurrentCount == 0); 216if (_project._eventSubscriptionTracker.Add(fileInfoProvider)) 219fileInfoProvider.Updated += _project.OnDynamicFileInfoUpdated; 222if (_project._activeBatchScopes > 0) 229_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo)); 235Debug.Assert(_project._gate.CurrentCount == 0); 262using (_project._gate.DisposableWait()) 269_project._documentWatchedFiles[documentId].Dispose(); 270_project._documentWatchedFiles.Remove(documentId); 286if (_documentAlreadyInWorkspace(_project._projectSystemProjectFactory.Workspace.CurrentSolution, documentId)) 288if (_project._activeBatchScopes > 0) 294_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentRemoveAction(w, documentId)); 317using (_project._gate.DisposableWait()) 338if (_project._projectSystemProjectFactory.Workspace.CurrentSolution.GetDocument(documentId) != null) 340if (_project._activeBatchScopes > 0) 346_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => 354_project._projectSystemProjectFactory.RemoveDocumentToDocumentsNotFromFiles_NoLock(documentId); 379using (_project._gate.DisposableWait()) 387using (await _project._gate.DisposableWaitAsync().ConfigureAwait(false)) 390if (_project.HasBeenRemoved) 408documentsToChange.Add((documentId, new WorkspaceFileTextLoader(_project._projectSystemProjectFactory.SolutionServices, filePath, defaultEncoding: null))); 419await _project._projectSystemProjectFactory.ApplyBatchChangeToWorkspaceAsync((solutionChanges, projectUpdateState) => 423if (!_project._projectSystemProjectFactory.Workspace.IsDocumentOpen(documentId)) 446using (_project._gate.DisposableWait()) 449if (_project.HasBeenRemoved) 468_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => 479_project.Id, _project._filePath, projectSystemFilePath, CancellationToken.None).WaitAndGetResult_CanCallOnBackground(CancellationToken.None); 501using (_project._gate.DisposableWait()) 522if (_project._activeBatchScopes > 0) 528_project._projectSystemProjectFactory.ApplyChangeToWorkspace(_project.Id, solution => solution.WithProjectDocumentsOrder(_project.Id, documentIds.ToImmutable())); 549addDocumentChangeKind, removeDocuments, removeDocumentChangeKind, _project.Id, _documentsAddedInBatch.ToImmutableArray(), 618var documentId = DocumentId.CreateNewId(_project.Id, filePath);