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>
94
var documentId = DocumentId.CreateNewId(
_project
.Id, fullPath);
95
var textLoader =
_project
._projectSystemProjectFactory.CreateFileTextLoader(fullPath);
104
using (
_project
._gate.DisposableWait())
115
_project
._documentWatchedFiles.Add(documentId,
_project
._documentFileChangeContext.EnqueueWatchingFile(fullPath));
117
if (
_project
._activeBatchScopes > 0)
123
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo));
124
_project
._projectSystemProjectFactory.RaiseOnDocumentsAddedMaybeAsync(useAsync: false, [fullPath]).VerifyCompleted();
144
var documentId = DocumentId.CreateNewId(
_project
.Id, fullPath);
156
using (
_project
._gate.DisposableWait())
175
if (
_project
._activeBatchScopes > 0)
181
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w =>
183
_project
._projectSystemProjectFactory.AddDocumentToDocumentsNotFromFiles_NoLock(documentInfo.Id);
195
Debug.Assert(
_project
._gate.CurrentCount == 0);
216
if (
_project
._eventSubscriptionTracker.Add(fileInfoProvider))
219
fileInfoProvider.Updated +=
_project
.OnDynamicFileInfoUpdated;
222
if (
_project
._activeBatchScopes > 0)
229
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentAddAction(w, documentInfo));
235
Debug.Assert(
_project
._gate.CurrentCount == 0);
262
using (
_project
._gate.DisposableWait())
269
_project
._documentWatchedFiles[documentId].Dispose();
270
_project
._documentWatchedFiles.Remove(documentId);
286
if (_documentAlreadyInWorkspace(
_project
._projectSystemProjectFactory.Workspace.CurrentSolution, documentId))
288
if (
_project
._activeBatchScopes > 0)
294
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w => _documentRemoveAction(w, documentId));
317
using (
_project
._gate.DisposableWait())
338
if (
_project
._projectSystemProjectFactory.Workspace.CurrentSolution.GetDocument(documentId) != null)
340
if (
_project
._activeBatchScopes > 0)
346
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w =>
354
_project
._projectSystemProjectFactory.RemoveDocumentToDocumentsNotFromFiles_NoLock(documentId);
379
using (
_project
._gate.DisposableWait())
387
using (await
_project
._gate.DisposableWaitAsync().ConfigureAwait(false))
390
if (
_project
.HasBeenRemoved)
408
documentsToChange.Add((documentId, new WorkspaceFileTextLoader(
_project
._projectSystemProjectFactory.SolutionServices, filePath, defaultEncoding: null)));
419
await
_project
._projectSystemProjectFactory.ApplyBatchChangeToWorkspaceAsync((solutionChanges, projectUpdateState) =>
423
if (!
_project
._projectSystemProjectFactory.Workspace.IsDocumentOpen(documentId))
446
using (
_project
._gate.DisposableWait())
449
if (
_project
.HasBeenRemoved)
468
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(w =>
479
_project
.Id,
_project
._filePath, projectSystemFilePath, CancellationToken.None).WaitAndGetResult_CanCallOnBackground(CancellationToken.None);
501
using (
_project
._gate.DisposableWait())
522
if (
_project
._activeBatchScopes > 0)
528
_project
._projectSystemProjectFactory.ApplyChangeToWorkspace(
_project
.Id, solution => solution.WithProjectDocumentsOrder(
_project
.Id, documentIds.ToImmutable()));
549
addDocumentChangeKind, removeDocuments, removeDocumentChangeKind,
_project
.Id, _documentsAddedInBatch.ToImmutableArray(),
618
var documentId = DocumentId.CreateNewId(
_project
.Id, filePath);