1 write to _project
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
92_project = project;
51 references to _project
Microsoft.CodeAnalysis.Workspaces (51)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (51)
30/// This class is otherwise free to operate on private members of <see cref="_project"/> if needed.</remarks> 107var documentId = DocumentId.CreateNewId(_project.Id, fullPath); 108var textLoader = _project._projectSystemProjectFactory.CreateFileTextLoader(fullPath); 117using (_project._gate.DisposableWait()) 128_project._documentWatchedFiles.Add(documentId, _project._documentFileChangeContext.EnqueueWatchingFile(fullPath)); 130if (_project._activeBatchScopes > 0) 136_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo)); 137_project._projectSystemProjectFactory.RaiseOnDocumentsAddedMaybeAsync(useAsync: false, [fullPath]).VerifyCompleted(); 157var documentId = DocumentId.CreateNewId(_project.Id, fullPath); 169using (_project._gate.DisposableWait()) 188if (_project._activeBatchScopes > 0) 194_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => 196_project._projectSystemProjectFactory.AddDocumentToDocumentsNotFromFiles_NoLock(documentInfo.Id); 208Debug.Assert(_project._gate.CurrentCount == 0); 229if (_project._dynamicFileInfoProvidersSubscribedTo.Add(fileInfoProvider)) 232fileInfoProvider.Updated += _project.OnDynamicFileInfoUpdated; 235if (_project._activeBatchScopes > 0) 242_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo)); 248Debug.Assert(_project._gate.CurrentCount == 0); 275using (_project._gate.DisposableWait()) 282_project._documentWatchedFiles[documentId].Dispose(); 283_project._documentWatchedFiles.Remove(documentId); 299if (_documentAlreadyInWorkspace(_project._projectSystemProjectFactory.Workspace.CurrentSolution, documentId)) 301if (_project._activeBatchScopes > 0) 307_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentRemoveAction(w, documentId)); 330using (_project._gate.DisposableWait()) 351if (_project._projectSystemProjectFactory.Workspace.CurrentSolution.GetDocument(documentId) != null) 353if (_project._activeBatchScopes > 0) 359_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => 367_project._projectSystemProjectFactory.RemoveDocumentToDocumentsNotFromFiles_NoLock(documentId); 392using (_project._gate.DisposableWait()) 400using (await _project._gate.DisposableWaitAsync().ConfigureAwait(false)) 403if (_project.HasBeenRemoved) 421documentsToChange.Add((documentId, new WorkspaceFileTextLoader(_project._projectSystemProjectFactory.SolutionServices, filePath, defaultEncoding: null))); 432await _project._projectSystemProjectFactory.ApplyBatchChangeToWorkspaceAsync((solutionChanges, projectUpdateState) => 436if (!_project._projectSystemProjectFactory.Workspace.IsDocumentOpen(documentId)) 465_project._projectSystemProjectFactory.WorkspaceListener, 466_project._asynchronousFileChangeProcessingCancellationTokenSource.Token); 479using (await _project._gate.DisposableWaitAsync(cancellationToken).ConfigureAwait(false)) 482if (_project.HasBeenRemoved) 495_project.Id, _project._filePath, projectSystemPath, CancellationToken.None).ConfigureAwait(false); 498await _project._projectSystemProjectFactory.ApplyChangeToWorkspaceAsync(w => 526using (_project._gate.DisposableWait()) 547if (_project._activeBatchScopes > 0) 553_project._projectSystemProjectFactory.ApplyChangeToWorkspace(_project.Id, solution => solution.WithProjectDocumentsOrder(_project.Id, documentIds.ToImmutable())); 574addDocumentChangeKind, removeDocuments, removeDocumentChangeKind, _project.Id, _documentsAddedInBatch.ToImmutableArray(), 643var documentId = DocumentId.CreateNewId(_project.Id, filePath);