1 implementation of JoinableTaskFactory
Microsoft.CodeAnalysis.EditorFeatures (1)
Shared\Utilities\ThreadingContext.cs (1)
54public JoinableTaskFactory JoinableTaskFactory
274 references to JoinableTaskFactory
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager.cs (1)
57await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures (98)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
164await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Adornments\AbstractAdornmentManager.cs (2)
182_threadingContext.JoinableTaskFactory.WithPriority(TextView.VisualElement.Dispatcher, DispatcherPriority.Render).RunAsync(async () => 186await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true);
AutomaticCompletion\BraceCompletionSessionProvider.BraceCompletionSession.cs (1)
82var success = ThreadingContext.JoinableTaskFactory.Run(() => TryStartAsync(GetFreshCancellationToken()));
BackgroundWorkIndicator\BackgroundWorkIndicatorContext.cs (2)
175await _factory._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(this.UserCancellationToken); 185await owner._factory._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(owner.UserCancellationToken);
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (1)
53return _threadingContext.JoinableTaskFactory.Run(() => ExecuteCommandAsync(textView, subjectBuffer, context));
Classification\CopyPasteAndPrintingClassificationBufferTaggerProvider.Tagger.cs (1)
154_owner._threadingContext.JoinableTaskFactory.Run(async () =>
CodeActions\CodeActionEditHandlerService.cs (3)
104await this._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 267await this._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 375await this._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
DocumentationComments\DocumentationCommentSuggestion.cs (3)
39await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancel); 52await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancel); 164await providerInstance.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (2)
83await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 110await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Extensibility\NavigationBar\AbstractEditorNavigationBarItemService.cs (1)
64await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (1)
62_threadingContext.JoinableTaskFactory.Run(async () =>
ExtractMethod\ExtractMethodCommandHandler.cs (4)
87_threadingContext.JoinableTaskFactory.Run(() => _renameService.ActiveSession.CommitAsync(previewChanges: false, context.OperationContext)); 178await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 199await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(waitContext.AllowCancellation); 230await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Formatting\FormatCommandHandler.cs (2)
63_threadingContext.JoinableTaskFactory.Run(() => FormatAsync( 113_threadingContext.JoinableTaskFactory.Run(() => ExecuteReturnOrTypeCommandWorkerAsync(args, cancellationToken));
Formatting\FormatCommandHandler.Paste.cs (1)
35_threadingContext.JoinableTaskFactory.Run(() => ExecuteCommandWorkerAsync());
GoOrFind\AbstractGoOrFindNavigationService.cs (1)
224await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
GoToDefinition\GoToDefinitionCommandHandler.cs (1)
142await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None);
Host\IStreamingFindReferencesPresenter.cs (1)
127await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
InlineHints\InlineHintsTag.cs (1)
264await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(threadingContext.DisposalToken);
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
139await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
InlineRename\InlineRenameService.cs (3)
55return _threadingContext.JoinableTaskFactory.Run(() => StartInlineSessionAsync(document, textSpan, cancellationToken)); 99await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 144await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
InlineRename\InlineRenameSession.cs (10)
302AllRenameLocationsTask = _threadingContext.JoinableTaskFactory.RunAsync(async () => 316await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken); 502_threadingContext.JoinableTaskFactory.RunAsync(async () => 504await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true); 530_conflictResolutionTask = _threadingContext.JoinableTaskFactory.RunAsync(async () => 559var replacementOperation = _threadingContext.JoinableTaskFactory.RunAsync(async () => 586await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 729await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 811await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 837await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
InlineRename\UI\SmartRename\SmartRenameViewModel.cs (3)
199await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 249await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken); 262await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
IntelliSense\AsyncCompletion\CommitManager.cs (1)
331_ = _threadingContext.JoinableTaskFactory.RunAsync(async () =>
IntelliSense\ModelComputation.cs (1)
127await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _stopCancellationToken);
Interactive\InteractiveDocumentNavigationService.cs (2)
32await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 65await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Interactive\InteractiveEvaluator.cs (2)
111_ = _threadingContext.JoinableTaskFactory.RunAsync(async () => 113await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
IWpfDifferenceViewerExtensions.cs (2)
32await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 81await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
IWpfTextViewExtensions.cs (2)
18threadingContext.JoinableTaskFactory.RunAsync(async () => 20await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true);
LanguageServer\AbstractInProcLanguageClient.cs (1)
155await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Navigation\AbstractDefinitionLocationService.cs (1)
235await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Navigation\IDocumentNavigationServiceExtensions.cs (1)
23await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
NavigationBar\NavigationBarController_ModelComputation.cs (2)
79await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken).NoThrowAwaitable(); 180await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Organizing\OrganizeDocumentCommandHandler.cs (2)
115await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 152await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Peek\DefinitionPeekableItem.cs (1)
61var success = _peekableItem._threadingContext.JoinableTaskFactory.Run(async () => await FindResultsAsync(
Peek\PeekableItemSource.cs (1)
66_threadingContext.JoinableTaskFactory.Run(() => AugumentPeekSessionAsync(peekableItems, context, triggerPoint.Value, document));
Preview\AbstractPreviewFactoryService.cs (10)
255await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 281await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 327await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 353await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 409await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 519await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 596await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 630await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 643await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 681await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
QuickInfo\OnTheFlyDocsView.xaml.cs (1)
185await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
122await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (4)
70await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 141await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 164await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 177await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None);
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (2)
100await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _cancellationToken).NoThrowAwaitable(); 119await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _cancellationToken).NoThrowAwaitable();
SemanticSearch\SemanticSearchEditorWorkspace.cs (1)
63await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None);
Shared\Extensions\ITextSnapshotExtensions.cs (1)
97return threadingContext.JoinableTaskFactory.Run(() =>
Shared\Extensions\WorkspaceExtensions.cs (1)
32await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Shared\Utilities\ThreadingContextTaskSchedulerProvider.cs (1)
21? new JoinableTaskFactoryTaskScheduler(threadingContext.JoinableTaskFactory)
Shared\Utilities\WorkspaceThreadingService.cs (1)
25return _threadingContext.JoinableTaskFactory.Run(asyncMethod);
SpellCheck\RoslynSpellCheckFixerProvider.cs (2)
66await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 108await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Suggestions\SuggestedActions\AbstractFixAllSuggestedAction.cs (1)
58await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Suggestions\SuggestedActions\SuggestedAction.cs (3)
137await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 149await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 231await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Suggestions\SuggestedActionsSource.cs (1)
168await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (1)
741tagTrees = _dataSource.ThreadingContext.JoinableTaskFactory.Run(() =>
Tagging\TaggerMainThreadManager.cs (1)
117await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(queueCancellationToken);
Workspaces\ITextBufferVisibilityTracker.cs (1)
83await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken).NoThrowAwaitable();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\EditorTestHostDocument.cs (1)
170var document = threadingContext.JoinableTaskFactory.Run(() => workspace.CurrentSolution.GetSourceGeneratedDocumentAsync(testDocument.Id, CancellationToken.None).AsTask());
Microsoft.CodeAnalysis.ExternalAccess.FSharp (6)
Internal\Editor\FSharpNavigationBarItemService.cs (1)
73await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Navigation\FSharpDocumentNavigationService.cs (4)
26return threadingContext.JoinableTaskFactory.Run(() => 33return threadingContext.JoinableTaskFactory.Run(() => 40return threadingContext.JoinableTaskFactory.Run(() => 48return threadingContext.JoinableTaskFactory.Run(() =>
VS\IFSharpWorkspaceProjectContextFactory.cs (1)
66=> new(_threadingContext.JoinableTaskFactory.Run(() => _factory.CreateProjectContextAsync(
Microsoft.VisualStudio.LanguageServices (151)
CallHierarchy\CallHierarchyCommandHandler.cs (2)
88await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 95await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
CodeCleanup\AbstractCodeCleanUpFixer.cs (2)
71await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(context.OperationContext.UserCancellationToken); 187await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
CodeDefinitionWindow\VisualStudioCodeDefinitionWindowService.cs (2)
38await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 56await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
CodeLens\CodeLensCallbackListener.cs (1)
208await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ColorSchemes\ColorSchemeApplier.cs (1)
116await VsTaskLibraryHelper.StartOnIdle(_threadingContext.JoinableTaskFactory, () => UpdateColorSchemeAsync(cancellationToken));
ColorSchemes\ColorSchemeApplier.Settings.cs (2)
65await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 90await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
DesignerAttribute\VisualStudioDesignerAttributeService.cs (2)
189await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken); 286await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.Factory.cs (1)
37await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (3)
66await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 189_threadingContext.JoinableTaskFactory.RunAsync(async () => 267await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
DocumentOutline\DocumentOutlineViewModel.cs (4)
253await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 272await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 325await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 441await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
EditorConfigSettings\SettingsEditorControl.xaml.cs (1)
94_threadingContext.JoinableTaskFactory.Run(async () =>
EditorConfigSettings\SettingsEditorFactory.cs (2)
87if (_vsServiceProvider.TryGetService<SLocalRegistry, ILocalRegistry>(threadingContext.JoinableTaskFactory, out var localRegistry)) 102var 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 (2)
84_ = _threadingContext.JoinableTaskFactory.RunAsync(async () => 88await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken);
ErrorReporting\VisualStudioInfoBar.cs (2)
55_threadingContext.JoinableTaskFactory.RunAsync(async () => 69await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken);
Extensions\VsTextSpanExtensions.cs (1)
27await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
FindReferences\Entries\DocumentSpanEntry.cs (1)
190var excerpt = this.Presenter.ThreadingContext.JoinableTaskFactory.Run(() => excerptService.TryExcerptAsync(document, sourceSpan, ExcerptMode.Tooltip, classificationOptions, CancellationToken.None));
FindReferences\StreamingFindUsagesPresenter.cs (1)
324await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
FindReferences\VisualStudioDefinitionsAndReferencesFactory.cs (2)
39await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 96await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Implementation\AbstractEditorFactory.cs (1)
251threadingContext.JoinableTaskFactory.Run(() => FormatDocumentCreatedFromTemplateAsync(hierarchy, filePath, cancellationToken));
Implementation\AbstractVsTextViewFilter.cs (2)
39(pbstrText, var result) = this.ThreadingContext.JoinableTaskFactory.Run(() => GetDataTipTextAsync(pSpan)); 133return this.ThreadingContext.JoinableTaskFactory.Run(() => GetPairExtentsAsync(iLine, iIndex, pSpan));
Interop\CleanableWeakComHandleTable.cs (1)
67await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken);
KeybindingReset\KeybindingResetDetector.cs (5)
112await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken); 323await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 344await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 384_threadingContext.JoinableTaskFactory.Run(ShutdownAsync); 435await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
LanguageService\AbstractLanguageService`2.IVsLanguageContextProvider.cs (1)
18return this.ThreadingContext.JoinableTaskFactory.Run(async () =>
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (4)
81return this.ThreadingContext.JoinableTaskFactory.Run(async () => 124ppEnum = this.ThreadingContext.JoinableTaskFactory.Run(async () => 182ppNames = this.ThreadingContext.JoinableTaskFactory.Run(async () => 241return this.ThreadingContext.JoinableTaskFactory.Run(async () =>
Library\AbstractLibraryManager_IVsSimpleLibrary2.cs (1)
55ppIVsSimpleObjectList2 = this.ThreadingContext.JoinableTaskFactory.Run(
Library\AbstractObjectList.cs (6)
149var result = this.LibraryManager.ThreadingContext.JoinableTaskFactory.Run( 158ppdispBrowseObj = this.LibraryManager.ThreadingContext.JoinableTaskFactory.Run(() => 210pfExpandable = this.LibraryManager.ThreadingContext.JoinableTaskFactory.Run( 235ppIVsSimpleObjectList2 = this.LibraryManager.ThreadingContext.JoinableTaskFactory.Run( 245(ppNavInfo, var result) = this.LibraryManager.ThreadingContext.JoinableTaskFactory.Run(async () => 270var (success, obj) = this.LibraryManager.ThreadingContext.JoinableTaskFactory.Run(() =>
Library\ClassView\AbstractSyncClassViewCommandHandler.cs (1)
40return _threadingContext.JoinableTaskFactory.Run(() => ExecuteCommandAsync(args, context, caretPosition));
NavigateTo\RoslynSearchResultPreviewPanel.cs (1)
39provider._threadingContext.JoinableTaskFactory),
Packaging\PackageInstallerServiceFactory.cs (5)
165await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(DisposalToken); 273await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 351await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 365await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 412await 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);
ProjectSystem\FileChangeWatcherProvider.cs (1)
31await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(threadingContext.DisposalToken);
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
109ProjectSystemProject = threadingContext.JoinableTaskFactory.Run(() => projectFactory.CreateAndAddToWorkspaceAsync(
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
115var textManager = _threadingContext.JoinableTaskFactory.Run(() => _textManagerService.GetValueOrNullAsync(CancellationToken.None));
ProjectSystem\OpenTextBufferProvider.cs (1)
116await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
ProjectSystem\RuleSets\RuleSetEventHandler.cs (1)
45await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ProjectSystem\RuleSets\VisualStudioRuleSetManager.RuleSetFile.cs (2)
182_ruleSetManager._threadingContext.JoinableTaskFactory.RunAsync(async () => 185await _ruleSetManager._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _disposalToken);
ProjectSystem\VisualStudioProjectFactory.cs (3)
57_initializationTask = _threadingContext.JoinableTaskFactory.RunAsync( 67await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken); 124return _threadingContext.JoinableTaskFactory.Run(async () =>
ProjectSystem\VisualStudioWorkspaceImpl.cs (6)
212await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _threadingContext.DisposalToken); 285var document = _threadingContext.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask()); 629var mappedChanges = _threadingContext.JoinableTaskFactory.Run(() => GetMappedTextChangesAsync(solutionChanges)); 923var dte = _threadingContext.JoinableTaskFactory.Run(() => _asyncServiceProvider.GetServiceAsync<SDTE, EnvDTE.DTE>(_threadingContext.DisposalToken)); 1623var joinableTask = _threadingContext.JoinableTaskFactory.RunAsync(() => UpdateUIContextAsync(language, cancellationToken)); 1635await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
393await _workspace._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
Remote\VisualStudioRemoteHostClientProvider.cs (1)
124_lazyClient = new VSThreading.AsyncLazy<RemoteHostClient?>(CreateHostClientAsync, _threadingContext.JoinableTaskFactory);
RoslynPackage.cs (1)
57await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Snippets\AbstractSnippetCommandHandler.cs (1)
286var textManager = this.ThreadingContext.JoinableTaskFactory.Run(() => _textManager.GetValueOrNullAsync(CancellationToken.None));
Snippets\AbstractSnippetInfoService.cs (2)
61await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 135await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
Snippets\SnippetExpansionClient.cs (4)
231_threadingContext.JoinableTaskFactory.Run(() => AddReferencesAndImportsAsync( 546var symbols = _threadingContext.JoinableTaskFactory.Run(() => GetReferencedSymbolsToLeftOfCaretAsync(document, caretPosition: triggerSpan.End, cancellationToken)); 706_threadingContext.JoinableTaskFactory.Run(() => OnModelUpdatedAsync(e.NewModel, CancellationToken.None)); 786await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Snippets\SnippetFunctions\AbstractSnippetFunction.cs (2)
34(var exitCode, value, hasDefaultValue) = _threadingContext.JoinableTaskFactory.Run(() => GetDefaultValueAsync(cancellationToken)); 45(var 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)
88_threadingContext.JoinableTaskFactory.Run(() => DoPasteAsync(cancellationToken));
StackTraceExplorer\StackTraceExplorerViewModel.cs (2)
78await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 89await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
SymbolSearch\VisualStudioSymbolSearchService.cs (1)
95await this.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
SyncNamespaces\SyncNamespacesCommandHandler.cs (2)
58await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 138solution = _threadingContext.JoinableTaskFactory.Run(
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (1)
65await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (3)
73return _threadingContext.JoinableTaskFactory.Run(async () => 92return _threadingContext.JoinableTaskFactory.Run(async () => 110return _threadingContext.JoinableTaskFactory.Run(async () =>
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (4)
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)
151await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 162await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
ValueTracking\ValueTrackingCommandHandler.cs (3)
99_threadingContext.JoinableTaskFactory.RunAsync(async () => 156await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 193await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ValueTracking\ValueTrackingToolWindow.cs (2)
77_ = _threadingContext.JoinableTaskFactory.RunAsync(async () => 79await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
Workspace\SourceGeneratedFileManager.cs (9)
136await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 137var openDocumentService = _serviceProvider.GetService<SVsUIShellOpenDocument, IVsUIShellOpenDocument>(_threadingContext.JoinableTaskFactory); 201_threadingContext.JoinableTaskFactory.Run(() => openFile.RefreshFileAsync(CancellationToken.None).AsTask()); 204var runningDocumentTable = _serviceProvider.GetService<SVsRunningDocumentTable, IVsRunningDocumentTable4>(_threadingContext.JoinableTaskFactory); 214_threadingContext.JoinableTaskFactory.Run(() => openFile.SetWindowFrameAsync(windowFrame)); 370await _fileManager._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 465await _fileManager._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 484await _fileManager._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 511_currentInfoBarMessage = _fileManager._threadingContext.JoinableTaskFactory.Run(() =>
Workspace\VisualStudioActiveDocumentTracker.cs (1)
58await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Workspace\VisualStudioDocumentNavigationService.cs (4)
170await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 288await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 296await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 377await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Workspace\VisualStudioSourceGeneratorTelemetryCollectorWorkspaceServiceFactory.cs (1)
77await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken);
Workspace\VisualStudioSymbolNavigationService.cs (5)
112await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 133await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 183await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 224await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 271await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Workspace\VisualStudioWorkspaceStatusServiceFactory.cs (4)
73_loadHubClientPackage = _threadingContext.JoinableTaskFactory.RunAsync(async () => 77await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _threadingContext.DisposalToken); 85_progressStageStatus = _threadingContext.JoinableTaskFactory.RunAsync(async () => 91await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _threadingContext.DisposalToken);
Microsoft.VisualStudio.LanguageServices.CSharp (7)
Interactive\OpenInteractiveWindowCommand.cs (1)
33await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Interactive\ResetInteractiveWindowFromProjectCommand.cs (1)
50await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
124var (result, newCount) = this.ThreadingContext.JoinableTaskFactory.Run(GetValidStartupClassesAsync);
SemanticSearch\SemanticSearchToolWindowController.cs (1)
40await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
SemanticSearch\SemanticSearchToolWindowImpl.cs (3)
115await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 412await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 423await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Microsoft.VisualStudio.LanguageServices.LiveShare (3)
Client\RemoteLanguageServiceWorkspace.cs (2)
231await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 396_threadingContext.JoinableTaskFactory.Run(async () =>
Client\RemoteLanguageServiceWorkspaceHost.cs (1)
100await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Microsoft.VisualStudio.LanguageServices.Xaml (3)
Implementation\XamlProjectService.cs (3)
100return _threadingContext.JoinableTaskFactory.Run(async () => 102await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 161project = _threadingContext.JoinableTaskFactory.Run(() => _visualStudioProjectFactory.CreateAndAddToWorkspaceAsync(
Roslyn.VisualStudio.DiagnosticsWindow (4)
Loggers\OutputWindowLogger.cs (2)
88_threadingContext.JoinableTaskFactory.Run(async () => 90await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();
OptionPages\PerformanceLoggersPage.cs (2)
67var client = threadingContext.JoinableTaskFactory.Run(() => RemoteHostClient.TryGetClientAsync(workspaceServices, CancellationToken.None)); 72threadingContext.JoinableTaskFactory.Run(async () => _ = await client.TryInvokeAsync<IRemoteProcessTelemetryService>(