1 write to _threadingContext
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
124_threadingContext = exportProvider.GetExportedValue<IThreadingContext>();
33 references to _threadingContext
Microsoft.VisualStudio.LanguageServices (33)
ProjectSystem\VisualStudioWorkspaceImpl.cs (20)
138this, FileChangeWatcher, CheckForAddedFileBeingOpenMaybeAsync, RemoveProjectFromMaps, _threadingContext.DisposalToken); 146_updateUIContextJoinableTasks = new JoinableTaskCollection(_threadingContext.JoinableTaskContext); 157_threadingContext.ThrowIfNotOnUIThread(); 198await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _threadingContext.DisposalToken); 219await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken); 303var document = _threadingContext.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask()); 323if (!_threadingContext.JoinableTaskContext.IsOnMainThread) 375_threadingContext.ThrowIfNotOnUIThread(); 647var mappedChanges = _threadingContext.JoinableTaskFactory.Run(() => GetMappedTextChangesAsync(solutionChanges)); 941var dte = _threadingContext.JoinableTaskFactory.Run(() => _asyncServiceProvider.GetServiceAsync<SDTE, EnvDTE.DTE>(_threadingContext.DisposalToken)); 1087if (!_threadingContext.JoinableTaskContext.IsOnMainThread) 1197this._threadingContext.ThrowIfNotOnUIThread(); 1402_threadingContext.ThrowIfNotOnUIThread(); 1526_threadingContext.ThrowIfNotOnUIThread(); 1619_threadingContext.RunWithShutdownBlockAsync(async cancellationToken => 1641var joinableTask = _threadingContext.JoinableTaskFactory.RunAsync(() => UpdateUIContextAsync(language, cancellationToken)); 1653await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (12)
65workspace._threadingContext.ThrowIfNotOnUIThread(); 101_workspace._threadingContext.ThrowIfNotOnUIThread(); 114_workspace._threadingContext.ThrowIfNotOnUIThread(); 136_workspace._threadingContext.ThrowIfNotOnUIThread(); 192_workspace._threadingContext.ThrowIfNotOnUIThread(); 263_workspace._threadingContext.ThrowIfNotOnUIThread(); 275_workspace._threadingContext.ThrowIfNotOnUIThread(); 297_workspace._threadingContext.ThrowIfNotOnUIThread(); 315_workspace._threadingContext.ThrowIfNotOnUIThread(); 364if (_workspace._threadingContext.JoinableTaskContext.IsOnMainThread) 398await _workspace._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 414_workspace._threadingContext.ThrowIfNotOnUIThread();
ProjectSystem\VisualStudioWorkspaceImpl_SourceGenerators.cs (1)
19_threadingContext.ThrowIfNotOnUIThread();