1 write to _threadingContext
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
125_threadingContext = exportProvider.GetExportedValue<IThreadingContext>();
33 references to _threadingContext
Microsoft.VisualStudio.LanguageServices (33)
ProjectSystem\VisualStudioWorkspaceImpl.cs (20)
139this, FileChangeWatcher, CheckForAddedFileBeingOpenMaybeAsync, RemoveProjectFromMaps, _threadingContext.DisposalToken); 147_updateUIContextJoinableTasks = new JoinableTaskCollection(_threadingContext.JoinableTaskContext); 158_threadingContext.ThrowIfNotOnUIThread(); 199await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _threadingContext.DisposalToken); 220await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken); 304var document = _threadingContext.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask()); 324if (!_threadingContext.JoinableTaskContext.IsOnMainThread) 376_threadingContext.ThrowIfNotOnUIThread(); 648var mappedChanges = _threadingContext.JoinableTaskFactory.Run(() => GetMappedTextChangesAsync(solutionChanges)); 942var dte = _threadingContext.JoinableTaskFactory.Run(() => _asyncServiceProvider.GetServiceAsync<SDTE, EnvDTE.DTE>(_threadingContext.DisposalToken)); 1092if (!_threadingContext.JoinableTaskContext.IsOnMainThread) 1202this._threadingContext.ThrowIfNotOnUIThread(); 1407_threadingContext.ThrowIfNotOnUIThread(); 1531_threadingContext.ThrowIfNotOnUIThread(); 1624_threadingContext.RunWithShutdownBlockAsync(async cancellationToken => 1646var joinableTask = _threadingContext.JoinableTaskFactory.RunAsync(() => UpdateUIContextAsync(language, cancellationToken)); 1658await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (12)
61workspace._threadingContext.ThrowIfNotOnUIThread(); 97_workspace._threadingContext.ThrowIfNotOnUIThread(); 110_workspace._threadingContext.ThrowIfNotOnUIThread(); 132_workspace._threadingContext.ThrowIfNotOnUIThread(); 188_workspace._threadingContext.ThrowIfNotOnUIThread(); 259_workspace._threadingContext.ThrowIfNotOnUIThread(); 271_workspace._threadingContext.ThrowIfNotOnUIThread(); 293_workspace._threadingContext.ThrowIfNotOnUIThread(); 311_workspace._threadingContext.ThrowIfNotOnUIThread(); 360if (_workspace._threadingContext.JoinableTaskContext.IsOnMainThread) 384await _workspace._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 396_workspace._threadingContext.ThrowIfNotOnUIThread();
ProjectSystem\VisualStudioWorkspaceImpl_SourceGenerators.cs (1)
19_threadingContext.ThrowIfNotOnUIThread();