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>
107
var documentId = DocumentId.CreateNewId(
_project
.Id, fullPath);
108
var textLoader =
_project
._projectSystemProjectFactory.CreateFileTextLoader(fullPath);
117
using (
_project
._gate.DisposableWait())
128
_project
._documentWatchedFiles.Add(documentId,
_project
._documentFileChangeContext.EnqueueWatchingFile(fullPath));
130
if (
_project
._activeBatchScopes > 0)
136
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo));
137
_project
._projectSystemProjectFactory.RaiseOnDocumentsAddedMaybeAsync(useAsync: false, [fullPath]).VerifyCompleted();
157
var documentId = DocumentId.CreateNewId(
_project
.Id, fullPath);
169
using (
_project
._gate.DisposableWait())
188
if (
_project
._activeBatchScopes > 0)
194
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w =>
196
_project
._projectSystemProjectFactory.AddDocumentToDocumentsNotFromFiles_NoLock(documentInfo.Id);
208
Debug.Assert(
_project
._gate.CurrentCount == 0);
229
if (
_project
._dynamicFileInfoProvidersSubscribedTo.Add(fileInfoProvider))
232
fileInfoProvider.Updated +=
_project
.OnDynamicFileInfoUpdated;
235
if (
_project
._activeBatchScopes > 0)
242
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo));
248
Debug.Assert(
_project
._gate.CurrentCount == 0);
275
using (
_project
._gate.DisposableWait())
282
_project
._documentWatchedFiles[documentId].Dispose();
283
_project
._documentWatchedFiles.Remove(documentId);
299
if (_documentAlreadyInWorkspace(
_project
._projectSystemProjectFactory.Workspace.CurrentSolution, documentId))
301
if (
_project
._activeBatchScopes > 0)
307
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentRemoveAction(w, documentId));
330
using (
_project
._gate.DisposableWait())
351
if (
_project
._projectSystemProjectFactory.Workspace.CurrentSolution.GetDocument(documentId) != null)
353
if (
_project
._activeBatchScopes > 0)
359
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w =>
367
_project
._projectSystemProjectFactory.RemoveDocumentToDocumentsNotFromFiles_NoLock(documentId);
392
using (
_project
._gate.DisposableWait())
400
using (await
_project
._gate.DisposableWaitAsync().ConfigureAwait(false))
403
if (
_project
.HasBeenRemoved)
421
documentsToChange.Add((documentId, new WorkspaceFileTextLoader(
_project
._projectSystemProjectFactory.SolutionServices, filePath, defaultEncoding: null)));
432
await
_project
._projectSystemProjectFactory.ApplyBatchChangeToWorkspaceAsync((solutionChanges, projectUpdateState) =>
436
if (!
_project
._projectSystemProjectFactory.Workspace.IsDocumentOpen(documentId))
465
_project
._projectSystemProjectFactory.WorkspaceListener,
466
_project
._asynchronousFileChangeProcessingCancellationTokenSource.Token);
479
using (await
_project
._gate.DisposableWaitAsync(cancellationToken).ConfigureAwait(false))
482
if (
_project
.HasBeenRemoved)
495
_project
.Id,
_project
._filePath, projectSystemPath, CancellationToken.None).ConfigureAwait(false);
498
await
_project
._projectSystemProjectFactory.ApplyChangeToWorkspaceAsync(w =>
526
using (
_project
._gate.DisposableWait())
547
if (
_project
._activeBatchScopes > 0)
553
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(
_project
.Id, solution => solution.WithProjectDocumentsOrder(
_project
.Id, documentIds.ToImmutable()));
574
addDocumentChangeKind, removeDocuments, removeDocumentChangeKind,
_project
.Id, _documentsAddedInBatch.ToImmutableArray(),
643
var documentId = DocumentId.CreateNewId(
_project
.Id, filePath);