1 write to _project
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
91_project = project;
51 references to _project
Microsoft.CodeAnalysis.Workspaces (51)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (51)
29/// This class is otherwise free to operate on private members of <see cref="_project"/> if needed.</remarks> 106var documentId = DocumentId.CreateNewId(_project.Id, fullPath); 107var textLoader = _project._projectSystemProjectFactory.CreateFileTextLoader(fullPath); 116using (_project._gate.DisposableWait()) 127_project._documentWatchedFiles.Add(documentId, _project._documentFileChangeContext.EnqueueWatchingFile(fullPath)); 129if (_project._activeBatchScopes > 0) 135_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo)); 136_project._projectSystemProjectFactory.RaiseOnDocumentsAddedMaybeAsync(useAsync: false, [fullPath]).VerifyCompleted(); 156var documentId = DocumentId.CreateNewId(_project.Id, fullPath); 168using (_project._gate.DisposableWait()) 187if (_project._activeBatchScopes > 0) 193_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => 195_project._projectSystemProjectFactory.AddDocumentToDocumentsNotFromFiles_NoLock(documentInfo.Id); 207Debug.Assert(_project._gate.CurrentCount == 0); 228if (_project._dynamicFileInfoProvidersSubscribedTo.Add(fileInfoProvider)) 231fileInfoProvider.Updated += _project.OnDynamicFileInfoUpdated; 234if (_project._activeBatchScopes > 0) 241_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo)); 247Debug.Assert(_project._gate.CurrentCount == 0); 274using (_project._gate.DisposableWait()) 281_project._documentWatchedFiles[documentId].Dispose(); 282_project._documentWatchedFiles.Remove(documentId); 298if (_documentAlreadyInWorkspace(_project._projectSystemProjectFactory.Workspace.CurrentSolution, documentId)) 300if (_project._activeBatchScopes > 0) 306_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentRemoveAction(w, documentId)); 329using (_project._gate.DisposableWait()) 350if (_project._projectSystemProjectFactory.Workspace.CurrentSolution.GetDocument(documentId) != null) 352if (_project._activeBatchScopes > 0) 358_project._projectSystemProjectFactory.ApplyChangeToWorkspace(w => 366_project._projectSystemProjectFactory.RemoveDocumentToDocumentsNotFromFiles_NoLock(documentId); 391using (_project._gate.DisposableWait()) 399using (await _project._gate.DisposableWaitAsync().ConfigureAwait(false)) 402if (_project.HasBeenRemoved) 420documentsToChange.Add((documentId, new WorkspaceFileTextLoader(_project._projectSystemProjectFactory.SolutionServices, filePath, defaultEncoding: null))); 431await _project._projectSystemProjectFactory.ApplyBatchChangeToWorkspaceAsync((solutionChanges, projectUpdateState) => 435if (!_project._projectSystemProjectFactory.Workspace.IsDocumentOpen(documentId)) 464_project._projectSystemProjectFactory.WorkspaceListener, 465_project._asynchronousFileChangeProcessingCancellationTokenSource.Token); 478using (await _project._gate.DisposableWaitAsync(cancellationToken).ConfigureAwait(false)) 481if (_project.HasBeenRemoved) 494_project.Id, _project._filePath, projectSystemPath, CancellationToken.None).ConfigureAwait(false); 497await _project._projectSystemProjectFactory.ApplyChangeToWorkspaceAsync(w => 525using (_project._gate.DisposableWait()) 546if (_project._activeBatchScopes > 0) 552_project._projectSystemProjectFactory.ApplyChangeToWorkspace(_project.Id, solution => solution.WithProjectDocumentsOrder(_project.Id, documentIds.ToImmutable())); 573addDocumentChangeKind, removeDocuments, removeDocumentChangeKind, _project.Id, _documentsAddedInBatch.ToImmutableArray(), 642var documentId = DocumentId.CreateNewId(_project.Id, filePath);