1 implementation of JoinableTaskFactory
Microsoft.CodeAnalysis.EditorFeatures (1)
Shared\Utilities\ThreadingContext.cs (1)
54public JoinableTaskFactory JoinableTaskFactory
320 references to JoinableTaskFactory
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
136await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures (73)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
176await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Classification\CopyPasteAndPrintingClassificationBufferTaggerProvider.Tagger.cs (1)
139_owner._threadingContext.JoinableTaskFactory.Run(async () =>
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
128await _taggerProvider._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_disposalCancellationSource.Token);
CodeActions\CodeActionEditHandlerService.cs (3)
114await this._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 277await this._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 372await this._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Diagnostics\AbstractPushOrPullDiagnosticsTaggerProvider.PushDiagnosticsTaggerProvider.cs (1)
81document = ThreadingContext.JoinableTaskFactory.Run(() => project.GetSourceGeneratedDocumentAsync(documentId, CancellationToken.None).AsTask());
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (2)
96await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 123await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Extensibility\NavigationBar\AbstractEditorNavigationBarItemService.cs (1)
64await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (1)
67_threadingContext.JoinableTaskFactory.Run(async () =>
ExtractMethod\ExtractMethodCommandHandler.cs (5)
98_threadingContext.JoinableTaskFactory.Run(() => _renameService.ActiveSession.CommitAsync(previewChanges: false, CancellationToken.None)); 167await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 197await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 249await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 263await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
GoToDefinition\AbstractGoToCommandHandler`2.cs (1)
224await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
GoToDefinition\GoToDefinitionCommandHandler.cs (2)
138return _threadingContext.JoinableTaskFactory.Run(async () => 202await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None);
Host\IStreamingFindReferencesPresenter.cs (1)
117await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
133await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
InlineRename\InlineRenameService.cs (3)
73return _threadingContext.JoinableTaskFactory.Run(() => StartInlineSessionAsync(document, textSpan, cancellationToken)); 117await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 164await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
InlineRename\InlineRenameSession.cs (13)
314_allRenameLocationsTask = _threadingContext.JoinableTaskFactory.RunAsync(async () => 328await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken); 506_threadingContext.JoinableTaskFactory.RunAsync(async () => 508await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true); 534_conflictResolutionTask = _threadingContext.JoinableTaskFactory.RunAsync(async () => 563var replacementOperation = _threadingContext.JoinableTaskFactory.RunAsync(async () => 574await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken); 672await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 742return _threadingContext.JoinableTaskFactory.Run(() => CommitWorkerAsync(previewChanges, canUseBackgroundWorkIndicator: false, CancellationToken.None)); 752await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 827await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 855await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 877await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
IntelliSense\AsyncCompletion\CommitManager.cs (1)
314_ = _threadingContext.JoinableTaskFactory.RunAsync(async () =>
IntelliSense\ModelComputation.cs (1)
159await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _stopCancellationToken);
LanguageServer\AbstractInProcLanguageClient.cs (1)
150await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Navigation\IDocumentNavigationServiceExtensions.cs (1)
22await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
NavigationBar\NavigationBarController_ModelComputation.cs (3)
28await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 97await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 137await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Preview\AbstractPreviewFactoryService.cs (10)
256await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 282await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 328await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 354await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 410await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 505await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 580await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 614await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 628await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 646await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
127await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (4)
68await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 139await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 162await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 175await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None);
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (2)
85await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _cancellationToken); 112await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _cancellationToken);
Shared\Extensions\ITextSnapshotExtensions.cs (1)
101return threadingContext.JoinableTaskFactory.Run(() =>
Shared\Utilities\ForegroundThreadAffinitizedObject.cs (1)
87await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Shared\Utilities\ThreadingContextTaskSchedulerProvider.cs (1)
26? new JoinableTaskFactoryTaskScheduler(threadingContext.JoinableTaskFactory)
Shared\Utilities\WorkspaceThreadingService.cs (1)
30return _threadingContext.JoinableTaskFactory.Run(asyncMethod);
SpellCheck\RoslynSpellCheckFixerProvider.cs (2)
71await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 113await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (4)
175await _dataSource.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 211await _dataSource.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 248await _dataSource.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 539_dataSource.ThreadingContext.JoinableTaskFactory.Run(() =>
Workspaces\ITextBufferVisibilityTracker.cs (2)
54await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 73await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (6)
AbstractFixAllSuggestedAction.cs (1)
60await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Preview\ICocoaDifferenceViewerExtensions.cs (2)
40await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 87await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
SuggestedAction.cs (2)
131await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 143await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
SuggestedActionsSource.cs (1)
152ThreadingContext.JoinableTaskFactory.Run(() => statusService.WaitUntilFullyLoadedAsync(cancellationToken));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\TestHostDocument.cs (1)
277var document = threadingContext.JoinableTaskFactory.Run(() => workspace.CurrentSolution.GetSourceGeneratedDocumentAsync(testDocument.Id, CancellationToken.None).AsTask());
Microsoft.CodeAnalysis.EditorFeatures.Wpf (19)
Adornments\AbstractAdornmentManager.cs (2)
182_threadingContext.JoinableTaskFactory.WithPriority(TextView.VisualElement.Dispatcher, DispatcherPriority.Render).RunAsync(async () => 186await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true);
BackgroundWorkIndicator\BackgroundWorkIndicatorContext.cs (2)
205await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 234await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
InlineHints\InlineHintsTag.cs (1)
270await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(threadingContext.DisposalToken);
Interactive\InteractiveDocumentNavigationService.cs (2)
39await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 72await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Interactive\InteractiveEvaluator.cs (2)
117_ = _threadingContext.JoinableTaskFactory.RunAsync(async () => 119await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
IWpfDifferenceViewerExtensions.cs (2)
39await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 88await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
IWpfTextViewExtensions.cs (2)
18threadingContext.JoinableTaskFactory.RunAsync(async () => 20await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true);
Peek\DefinitionPeekableItem.cs (1)
62var success = _peekableItem._threadingContext.JoinableTaskFactory.Run(async () => await FindResultsAsync(
Peek\PeekableItemSource.cs (1)
68_threadingContext.JoinableTaskFactory.Run(() => AugumentPeekSessionAsync(peekableItems, context, triggerPoint.Value, document));
Suggestions\SuggestedActions\AbstractFixAllSuggestedAction.cs (1)
60await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Suggestions\SuggestedActions\SuggestedAction.cs (2)
131await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 143await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Suggestions\SuggestedActionsSource.cs (1)
152ThreadingContext.JoinableTaskFactory.Run(() => statusService.WaitUntilFullyLoadedAsync(cancellationToken));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
IntelliSense\SignatureHelpControllerTests.vb (3)
163Await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync() 175Await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync() 182Dim handled = threadingContext.JoinableTaskFactory.RunAsync(Async Function()
Microsoft.CodeAnalysis.ExternalAccess.FSharp (8)
Internal\Editor\FSharpNavigationBarItemService.cs (1)
72await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Navigation\FSharpDocumentNavigationService.cs (6)
38return _threadingContext.JoinableTaskFactory.Run(() => 49return _threadingContext.JoinableTaskFactory.Run(() => 60return _threadingContext.JoinableTaskFactory.Run(() => 71return _threadingContext.JoinableTaskFactory.Run(() => 83return _threadingContext.JoinableTaskFactory.Run(() => 95return _threadingContext.JoinableTaskFactory.Run(() =>
VS\IFSharpWorkspaceProjectContextFactory.cs (1)
69=> new(_threadingContext.JoinableTaskFactory.Run(() => _factory.CreateProjectContextAsync(
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
38Await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken)
Microsoft.VisualStudio.LanguageServices (171)
CallHierarchy\CallHierarchyCommandHandler.cs (2)
106await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 114await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
CodeCleanup\AbstractCodeCleanUpFixer.cs (2)
85await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(context.OperationContext.UserCancellationToken); 242await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
CodeDefinitionWindow\VisualStudioCodeDefinitionWindowService.cs (3)
45_lazyCodeDefView = await _asyncServiceProvider.GetServiceAsync<SVsCodeDefView, IVsCodeDefView>(_threadingContext.JoinableTaskFactory).ConfigureAwait(true); 55await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 73await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
CodeLens\CodeLensCallbackListener.cs (1)
182await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ColorSchemes\ColorSchemeApplier.ClassificationVerifier.cs (2)
113_fontAndColorStorage = await _asyncServiceProvider.GetServiceAsync<SVsFontAndColorStorage, IVsFontAndColorStorage>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false); 116await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ColorSchemes\ColorSchemeApplier.cs (5)
70var settingsManager = await _asyncServiceProvider.GetServiceAsync<SVsSettingsPersistenceManager, ISettingsManager>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false); 72await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 114await VsTaskLibraryHelper.StartOnIdle(_threadingContext.JoinableTaskFactory, () => UpdateColorSchemeAsync(_threadingContext.DisposalToken)); 156var settingsManager = await _asyncServiceProvider.GetServiceAsync<SVsSettingsPersistenceManager, ISettingsManager>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false); 157await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ColorSchemes\ColorSchemeApplier.Settings.cs (2)
66await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 91await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
DesignerAttribute\VisualStudioDesignerAttributeService.cs (2)
187await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken); 286await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
Diagnostics\DiagnosticProgressReporter.cs (1)
99_taskCenterService = await serviceProvider.GetServiceAsync<SVsTaskStatusCenterService, IVsTaskStatusCenterService>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false);
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.Factory.cs (1)
38await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (7)
74var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false); 77await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 177var roslynPackage = _threadingContext.JoinableTaskFactory.Run(() => 247|| !_serviceProvider.TryGetService<SVsShell, IVsShell>(_threadingContext.JoinableTaskFactory, out var shell)) 252var roslynPackage = _threadingContext.JoinableTaskFactory.Run(() => 484_threadingContext.JoinableTaskFactory.RunAsync(async () => 486await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
DocumentOutline\DocumentOutlineControl_ModelComputation.cs (4)
46await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 122await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 161await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 179await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
EditorConfigSettings\SettingsEditorControl.xaml.cs (1)
91_threadingContext.JoinableTaskFactory.Run(async () =>
EditorConfigSettings\SettingsEditorFactory.cs (2)
107if (_vsServiceProvider.TryGetService<SLocalRegistry, ILocalRegistry>(_threadingContext.JoinableTaskFactory, out var localRegistry)) 122var oleServiceProvider = _vsServiceProvider.GetService<IOleServiceProvider>(_threadingContext.JoinableTaskFactory);
EditorConfigSettings\SettingsEditorPane.cs (8)
71if (_componentId == default && this.TryGetService<SOleComponentManager, IOleComponentManager>(_threadingContext.JoinableTaskFactory, out var componentManager)) 88if (this.TryGetService<SOleUndoManager, IOleUndoManager>(_threadingContext.JoinableTaskFactory, out _undoManager)) 118if (this.TryGetService<IMenuCommandService>(_threadingContext.JoinableTaskFactory, out var menuCommandService)) 169var windowSearchHostFactory = this.GetService<SVsWindowSearchHostFactory, IVsWindowSearchHostFactory>(_threadingContext.JoinableTaskFactory); 205if (this.TryGetService<SVsUIShellOpenDocument, IVsUIShellOpenDocument>(_threadingContext.JoinableTaskFactory, out var uishellOpenDocument) && 206this.TryGetService<SVsWindowFrame, IVsWindowFrame>(_threadingContext.JoinableTaskFactory, out var windowFrameOrig)) 253if (this.TryGetService<SOleComponentManager, IOleComponentManager>(_threadingContext.JoinableTaskFactory, out var componentManager)) 281if (this.TryGetService<SVsTextManager, IVsTextManager>(_threadingContext.JoinableTaskFactory, out var textManager))
EditorConfigSettings\SettingsEditorPane.SearchTask.cs (5)
34_ = _threadingContext.JoinableTaskFactory.RunAsync( 37await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 51await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 58_ = _threadingContext.JoinableTaskFactory.RunAsync( 61await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
ErrorReporting\VisualStudioErrorReportingService.cs (3)
78_ = _threadingContext.JoinableTaskFactory.RunAsync(async () => 82await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken); 84var activityLog = await ((IAsyncServiceProvider)_serviceProvider).GetServiceAsync<SVsActivityLog, IVsActivityLog>(_threadingContext.JoinableTaskFactory).ConfigureAwait(true);
ErrorReporting\VisualStudioInfoBar.cs (2)
50_threadingContext.JoinableTaskFactory.RunAsync(async () => 54await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken);
Extensions\VsTextSpanExtensions.cs (1)
29await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ExtractClass\VisualStudioExtractClassOptionsService.cs (1)
96await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ExtractInterface\VisualStudioExtractInterfaceOptionsService.cs (1)
72await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
FindReferences\Entries\DocumentSpanEntry.cs (1)
232var excerpt = Presenter.ThreadingContext.JoinableTaskFactory.Run(() => excerptService.TryExcerptAsync(document, sourceSpan, ExcerptMode.Tooltip, classificationOptions, CancellationToken.None));
FindReferences\StreamingFindUsagesPresenter.cs (1)
331await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
FindReferences\VisualStudioDefinitionsAndReferencesFactory.cs (2)
53await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 121await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Implementation\AbstractEditorFactory.cs (1)
255threadingContext.JoinableTaskFactory.Run(() => FormatDocumentCreatedFromTemplateAsync(hierarchy, itemid, filePath, cancellationToken));
Implementation\VirtualMemoryNotificationListener.cs (1)
72await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Implementation\VisualStudioMetadataAsSourceFileSupportService.cs (2)
37var solution = await serviceProvider.GetServiceAsync<SVsSolution, IVsSolution>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false); 38await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Interactive\AbstractResetInteractiveMenuCommand.cs (1)
80await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
Interop\CleanableWeakComHandleTable.cs (1)
67await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(ThreadingContext.DisposalToken);
KeybindingReset\KeybindingResetDetector.cs (4)
315await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 336await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 376ThreadingContext.JoinableTaskFactory.Run(ShutdownAsync); 425await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
LanguageClient\VisualStudioLogHubLoggerFactory.cs (1)
51var serviceContainer = await _asyncServiceProvider.GetServiceAsync<SVsBrokeredServiceContainer, IBrokeredServiceContainer>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false);
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (2)
105_threadingContext.JoinableTaskFactory.Run(async () => 206_threadingContext.JoinableTaskFactory.Run(async () =>
NavigateTo\RoslynSearchResultPreviewPanel.cs (1)
38provider._threadingContext.JoinableTaskFactory),
Options\PackageSettingsPersister.cs (1)
41await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Packaging\PackageInstallerServiceFactory.cs (5)
166await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(DisposalToken); 274await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 352await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 366await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 413await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Packaging\PackageInstallerServiceFactory_UndoRedo.cs (2)
29await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 49await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
PdbSourceDocument\PdbSourceDocumentOutputWindowLogger.cs (1)
52await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Progression\GraphNavigatorExtension.cs (1)
71this.ThreadingContext.JoinableTaskFactory.Run(() =>
ProjectSystem\FileChangeWatcherProvider.cs (1)
31await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(threadingContext.DisposalToken);
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
106ProjectSystemProject = threadingContext.JoinableTaskFactory.Run(() => projectFactory.CreateAndAddToWorkspaceAsync(
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
86_textManager = await serviceProvider.GetServiceAsync<SVsTextManager, IVsTextManager>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false);
ProjectSystem\OpenTextBufferProvider.cs (1)
98await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
ProjectSystem\RuleSets\RuleSetEventHandler.cs (2)
46var trackProjectDocuments = await serviceProvider.GetServiceAsync<SVsTrackProjectDocuments, IVsTrackProjectDocuments2>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false); 47await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ProjectSystem\RuleSets\VisualStudioRuleSetManager.RuleSetFile.cs (2)
184_ruleSetManager._threadingContext.JoinableTaskFactory.RunAsync(async () => 187await _ruleSetManager._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _disposalToken);
ProjectSystem\VisualStudioAddSolutionItemService.cs (3)
46_dte = await serviceProvider.GetServiceAsync<DTE, DTE>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false); 47_fileChangeService = await serviceProvider.GetServiceAsync<SVsFileChangeEx, IVsFileChangeEx>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false); 93await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ProjectSystem\VisualStudioProjectFactory.cs (2)
70await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 131return _threadingContext.JoinableTaskFactory.Run(async () =>
ProjectSystem\VisualStudioWorkspaceImpl.cs (5)
193await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken); 216await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken); 304var document = _threadingContext.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask()); 648var mappedChanges = _threadingContext.JoinableTaskFactory.Run(() => GetMappedTextChanges(solutionChanges)); 1519await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
389await _workspace._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
Remote\VisualStudioRemoteHostClientProvider.cs (2)
95_lazyClient = new VSThreading.AsyncLazy<RemoteHostClient?>(CreateHostClientAsync, threadingContext.JoinableTaskFactory); 102var brokeredServiceContainer = await _vsServiceProvider.GetServiceAsync<SVsBrokeredServiceContainer, IBrokeredServiceContainer>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false);
RoslynPackage.cs (1)
102await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Snippets\AbstractSnippetExpansionClient.cs (3)
550var symbols = ThreadingContext.JoinableTaskFactory.Run(() => GetReferencedSymbolsToLeftOfCaretAsync(document, caretPosition: triggerSpan.End, cancellationToken)); 744var compilation = ThreadingContext.JoinableTaskFactory.Run(() => document.Project.GetRequiredCompilationAsync(CancellationToken.None)); 908ThreadingContext.JoinableTaskFactory.Run(() => provider.ProvideArgumentAsync(context));
Snippets\AbstractSnippetInfoService.cs (2)
62await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 136await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
Snippets\SnippetFunctions\AbstractSnippetFunction.cs (2)
40var (ExitCode, Value, HasDefaultValue) = _threadingContext.JoinableTaskFactory.Run(() => GetDefaultValueAsync(cancellationToken)); 53var (ExitCode, Value, HasCurrentValue) = _threadingContext.JoinableTaskFactory.Run(() => GetCurrentValueAsync(cancellationToken));
StackTraceExplorer\StackTraceExplorerCommandHandler.cs (2)
59_threadingContext.JoinableTaskFactory.RunAsync(async () => 65await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
StackTraceExplorer\StackTraceExplorerRootViewModel.cs (1)
92_threadingContext.JoinableTaskFactory.Run(() => DoPasteAsync(cancellationToken));
StackTraceExplorer\StackTraceExplorerViewModel.cs (2)
83await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 94await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Storage\VisualStudioCloudCacheStorageService.cs (1)
54var serviceContainer = await _serviceProvider.GetServiceAsync<SVsBrokeredServiceContainer, IBrokeredServiceContainer>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false);
SymbolSearch\VisualStudioSymbolSearchService.cs (1)
77await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
SyncNamespaces\SyncNamespacesCommandHandler.cs (3)
59var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false); 62await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 141solution = _threadingContext.JoinableTaskFactory.Run(() => syncService.SyncNamespacesAsync(projects, options, operationContext.UserCancellationToken));
TableDataSource\AbstractTableEntriesSnapshot.cs (2)
172return this.ThreadingContext.JoinableTaskFactory.Run(() => 191var documents = ThreadingContext.JoinableTaskFactory.Run(() => project.GetSourceGeneratedDocumentsAsync(cancellationToken).AsTask());
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (3)
61_shellService = await serviceProvider.GetServiceAsync<SVsUIShell, IVsUIShell>(_threadingContext.JoinableTaskFactory).ConfigureAwait(false); 62var errorList = await serviceProvider.GetServiceAsync<SVsErrorList, IErrorList>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false); 65await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
TableDataSource\Suppression\VisualStudioDiagnosticListTableCommandHandler.cs (3)
72var errorList = await serviceProvider.GetServiceAsync<SVsErrorList, IErrorList>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false); 76var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false); 79await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
95var errorList = await serviceProvider.GetServiceAsync<SVsErrorList, IErrorList>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false);
TableDataSource\VisualStudioDiagnosticListTable.BuildTableDataSource.cs (1)
249var documents = threadingContext.JoinableTaskFactory.Run(() => project.GetSourceGeneratedDocumentsAsync(cancellationToken).AsTask());
TableDataSource\VisualStudioDiagnosticListTable.cs (1)
59await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
TaskList\VisualStudioTaskListService.cs (2)
120await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 121var taskList = await _asyncServiceProvider.GetServiceAsync<SVsTaskList, ITaskList>(_threadingContext.JoinableTaskFactory).ConfigureAwait(true);
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (5)
68var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false); 71await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 134if (dialog.ShowModal(_threadingContext.JoinableTaskFactory, solution, projectFilePath, referenceUpdates) == false) 160ApplyUnusedReferenceUpdates(_threadingContext.JoinableTaskFactory, solution, projectFilePath, referenceChanges, CancellationToken.None); 191var unusedReferences = _threadingContext.JoinableTaskFactory.Run(async () =>
ValueTracking\ValueTrackedTreeItemViewModel.cs (2)
149await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 160await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
ValueTracking\ValueTrackingCommandHandler.cs (3)
101_threadingContext.JoinableTaskFactory.RunAsync(async () => 158await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 195await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ValueTracking\ValueTrackingToolWindow.cs (2)
84_ = _threadingContext.JoinableTaskFactory.RunAsync(async () => 86await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
Workspace\SourceGeneratedFileManager.cs (5)
123await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 124var openDocumentService = _serviceProvider.GetService<SVsUIShellOpenDocument, IVsUIShellOpenDocument>(_threadingContext.JoinableTaskFactory); 174_threadingContext.JoinableTaskFactory.Run(() => openFile.RefreshFileAsync(CancellationToken.None).AsTask()); 177var runningDocumentTable = _serviceProvider.GetService<SVsRunningDocumentTable, IVsRunningDocumentTable4>(_threadingContext.JoinableTaskFactory); 354await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Workspace\VisualStudioActiveDocumentTracker.cs (1)
57await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Workspace\VisualStudioDocumentNavigationService.cs (4)
223await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 340await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 348await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 429await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Workspace\VisualStudioSourceGeneratorTelemetryCollectorWorkspaceServiceFactory.cs (2)
73var shellService = await _serviceProvider.GetServiceAsync<SVsSolution, IVsSolution>(_threadingContext.JoinableTaskFactory).ConfigureAwait(true); 74await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken);
Workspace\VisualStudioSymbolNavigationService.cs (5)
125await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 146await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 190await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 233await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 280await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Workspace\VisualStudioWorkspaceStatusServiceFactory.cs (6)
100_loadHubClientPackage = _threadingContext.JoinableTaskFactory.RunAsync(async () => 104await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _threadingContext.DisposalToken); 107var shell = await _serviceProvider.GetServiceAsync<SVsShell, IVsShell7>(_threadingContext.JoinableTaskFactory).ConfigureAwait(true); 113_progressStageStatus = _threadingContext.JoinableTaskFactory.RunAsync(async () => 119await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _threadingContext.DisposalToken); 120var service = await serviceProvider.GetServiceAsync<SVsOperationProgress, IVsOperationProgressStatusService>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(true);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Options\AdvancedOptionPageControl.xaml.cs (1)
208var (isSupportedTheme, isThemeCustomized) = _threadingContext.JoinableTaskFactory.Run(async () =>
Microsoft.VisualStudio.LanguageServices.Implementation (23)
CodeModel\AbstractCodeModelService.cs (3)
502var newSolution = _threadingContext.JoinableTaskFactory.Run(() => Renamer.RenameSymbolAsync(oldSolution, symbol, new SymbolRenameOptions(), newName)); 1044return _threadingContext.JoinableTaskFactory.Run(async () => 1090document = _threadingContext.JoinableTaskFactory.Run(async () =>
CodeModel\FileCodeModel.cs (6)
349var formatted = State.ThreadingContext.JoinableTaskFactory.Run(async () => 419document = State.ThreadingContext.JoinableTaskFactory.Run( 441=> State.ThreadingContext.JoinableTaskFactory.Run(() => 448=> State.ThreadingContext.JoinableTaskFactory.Run(() => 455=> State.ThreadingContext.JoinableTaskFactory.Run(() => 706var newDocument = State.ThreadingContext.JoinableTaskFactory.Run(async () =>
CodeModel\InternalElements\AbstractCodeElement.cs (1)
146=> State.ThreadingContext.JoinableTaskFactory.Run(() => GetDocument().GetLineFormattingOptionsAsync(GlobalOptions, CancellationToken.None).AsTask());
CodeModel\ProjectCodeModelFactory.cs (2)
109await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 233await _threadingContext.JoinableTaskFactory.StartOnIdle(
ProjectSystem\CPS\CPSProjectFactory.cs (2)
169await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 171var shell = await _serviceProvider.GetServiceAsync<SVsShell, IVsShell7>(_threadingContext.JoinableTaskFactory).ConfigureAwait(true);
RoslynVisualStudioWorkspace.cs (1)
94=> _threadingContext.JoinableTaskFactory.Run(() => TryGoToDefinitionAsync(symbol, project, cancellationToken));
SolutionExplorer\AnalyzerItemTracker.cs (2)
42_vsMonitorSelection ??= await serviceProvider.GetServiceAsync<SVsShellMonitorSelection, IVsMonitorSelection>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false); 43await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
SolutionExplorer\AnalyzerNodeSetup.cs (1)
39await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false),
SolutionExplorer\AnalyzersCommandHandler.cs (3)
102await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 398_threadingContext.JoinableTaskFactory.RunAsync(async () => 413await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken);
SolutionExplorer\SourceGeneratedFileItems\SourceGeneratedFileItem.cs (1)
68return _threadingContext.JoinableTaskFactory.Run(async () =>
SolutionExplorer\SourceGeneratedFileItems\SourceGeneratedFileItemSource.cs (1)
83await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Microsoft.VisualStudio.LanguageServices.LiveShare (4)
Client\RemoteLanguageServiceWorkspace.cs (3)
247await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 412_threadingContext.JoinableTaskFactory.Run(async () => 497var textBuffer = _threadingContext.JoinableTaskFactory.Run(async () =>
Client\RemoteLanguageServiceWorkspaceHost.cs (1)
106await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Microsoft.VisualStudio.LanguageServices.New.IntegrationTests (1)
InProcess\WorkspaceInProcess.cs (1)
205_ = _threadingContext.JoinableTaskFactory.RunAsync(async () =>
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
Options\AdvancedOptionPageControl.xaml.vb (1)
192Dim values = _threadingContext.JoinableTaskFactory.Run(
Microsoft.VisualStudio.LanguageServices.Xaml (3)
Implementation\XamlProjectService.cs (3)
95return _threadingContext.JoinableTaskFactory.Run(async () => 97await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 156project = _threadingContext.JoinableTaskFactory.Run(() => _visualStudioProjectFactory.CreateAndAddToWorkspaceAsync(
Roslyn.VisualStudio.DiagnosticsWindow (4)
Loggers\OutputWindowLogger.cs (2)
89_threadingContext.JoinableTaskFactory.Run(async () => 91await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
OptionPages\PerformanceLoggersPage.cs (2)
68var client = threadingContext.JoinableTaskFactory.Run(() => RemoteHostClient.TryGetClientAsync(workspaceServices, CancellationToken.None)); 73threadingContext.JoinableTaskFactory.Run(async () => _ = await client.TryInvokeAsync<IRemoteProcessTelemetryService>(