1 write to _threadingContext
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
118
_threadingContext
= exportProvider.GetExportedValue<IThreadingContext>();
15 references to _threadingContext
Microsoft.VisualStudio.LanguageServices (15)
ProjectSystem\VisualStudioWorkspaceImpl.cs (12)
125
_foregroundObject = new ForegroundThreadAffinitizedObject(
_threadingContext
);
143
_threadingContext
),
193
await
_threadingContext
.JoinableTaskFactory.SwitchToMainThreadAsync(
_threadingContext
.DisposalToken);
205
var memoryListener = await VirtualMemoryNotificationListener.CreateAsync(this,
_threadingContext
, asyncServiceProvider, _globalOptions,
_threadingContext
.DisposalToken).ConfigureAwait(true);
216
await
_threadingContext
.JoinableTaskFactory.SwitchToMainThreadAsync(
_threadingContext
.DisposalToken);
304
var document =
_threadingContext
.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask());
648
var mappedChanges =
_threadingContext
.JoinableTaskFactory.Run(() => GetMappedTextChanges(solutionChanges));
1510
_threadingContext
.RunWithShutdownBlockAsync(async cancellationToken =>
1519
await
_threadingContext
.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (3)
68
_foregroundAffinitization = new ForegroundThreadAffinitizedObject(workspace.
_threadingContext
, assertIsForeground: true);
365
if (_workspace.
_threadingContext
.JoinableTaskContext.IsOnMainThread)
389
await _workspace.
_threadingContext
.JoinableTaskFactory.SwitchToMainThreadAsync();