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>
106
var documentId = DocumentId.CreateNewId(
_project
.Id, fullPath);
107
var textLoader =
_project
._projectSystemProjectFactory.CreateFileTextLoader(fullPath);
116
using (
_project
._gate.DisposableWait())
127
_project
._documentWatchedFiles.Add(documentId,
_project
._documentFileChangeContext.EnqueueWatchingFile(fullPath));
129
if (
_project
._activeBatchScopes > 0)
135
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo));
136
_project
._projectSystemProjectFactory.RaiseOnDocumentsAddedMaybeAsync(useAsync: false, [fullPath]).VerifyCompleted();
156
var documentId = DocumentId.CreateNewId(
_project
.Id, fullPath);
168
using (
_project
._gate.DisposableWait())
187
if (
_project
._activeBatchScopes > 0)
193
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w =>
195
_project
._projectSystemProjectFactory.AddDocumentToDocumentsNotFromFiles_NoLock(documentInfo.Id);
207
Debug.Assert(
_project
._gate.CurrentCount == 0);
228
if (
_project
._dynamicFileInfoProvidersSubscribedTo.Add(fileInfoProvider))
231
fileInfoProvider.Updated +=
_project
.OnDynamicFileInfoUpdated;
234
if (
_project
._activeBatchScopes > 0)
241
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo));
247
Debug.Assert(
_project
._gate.CurrentCount == 0);
274
using (
_project
._gate.DisposableWait())
281
_project
._documentWatchedFiles[documentId].Dispose();
282
_project
._documentWatchedFiles.Remove(documentId);
298
if (_documentAlreadyInWorkspace(
_project
._projectSystemProjectFactory.Workspace.CurrentSolution, documentId))
300
if (
_project
._activeBatchScopes > 0)
306
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentRemoveAction(w, documentId));
329
using (
_project
._gate.DisposableWait())
350
if (
_project
._projectSystemProjectFactory.Workspace.CurrentSolution.GetDocument(documentId) != null)
352
if (
_project
._activeBatchScopes > 0)
358
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w =>
366
_project
._projectSystemProjectFactory.RemoveDocumentToDocumentsNotFromFiles_NoLock(documentId);
391
using (
_project
._gate.DisposableWait())
399
using (await
_project
._gate.DisposableWaitAsync().ConfigureAwait(false))
402
if (
_project
.HasBeenRemoved)
420
documentsToChange.Add((documentId, new WorkspaceFileTextLoader(
_project
._projectSystemProjectFactory.SolutionServices, filePath, defaultEncoding: null)));
431
await
_project
._projectSystemProjectFactory.ApplyBatchChangeToWorkspaceAsync((solutionChanges, projectUpdateState) =>
435
if (!
_project
._projectSystemProjectFactory.Workspace.IsDocumentOpen(documentId))
464
_project
._projectSystemProjectFactory.WorkspaceListener,
465
_project
._asynchronousFileChangeProcessingCancellationTokenSource.Token);
478
using (await
_project
._gate.DisposableWaitAsync(cancellationToken).ConfigureAwait(false))
481
if (
_project
.HasBeenRemoved)
494
_project
.Id,
_project
._filePath, projectSystemPath, CancellationToken.None).ConfigureAwait(false);
497
await
_project
._projectSystemProjectFactory.ApplyChangeToWorkspaceAsync(w =>
525
using (
_project
._gate.DisposableWait())
546
if (
_project
._activeBatchScopes > 0)
552
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(
_project
.Id, solution => solution.WithProjectDocumentsOrder(
_project
.Id, documentIds.ToImmutable()));
573
addDocumentChangeKind, removeDocuments, removeDocumentChangeKind,
_project
.Id, _documentsAddedInBatch.ToImmutableArray(),
642
var documentId = DocumentId.CreateNewId(
_project
.Id, filePath);