2 implementations of IAsyncToken
Microsoft.CodeAnalysis.Workspaces (2)
Shared\TestHooks\AsynchronousOperationListener+AsyncToken.cs (1)
12internal class AsyncToken : IAsyncToken
Shared\TestHooks\EmptyAsyncToken.cs (1)
7internal sealed class EmptyAsyncToken : IAsyncToken
138 references to IAsyncToken
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
126var asyncToken = asyncListener.BeginAsyncOperation(GetType().Name + ".Start");
Microsoft.CodeAnalysis.EditorFeatures (24)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
134var token = _listener.BeginAsyncOperation(nameof(ExecuteAsync));
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
119var token = _listener.BeginAsyncOperation(nameof(OnWorkspaceRegistrationChanged));
CodeDefinitionWindow\DefinitionContextTracker.cs (1)
122var asyncToken = _asyncListener.BeginAsyncOperation(nameof(DefinitionContextTracker) + "." + nameof(QueueUpdateForCaretPosition));
EditAndContinue\ActiveStatementTrackingService.cs (1)
77var token = _listener.BeginAsyncOperation(nameof(ActiveStatementTrackingService));
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (1)
35var token = _listener.BeginAsyncOperation(nameof(QueueUpdate));
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (1)
65var token = _listener.BeginAsyncOperation(FeatureAttribute.EncapsulateField);
ExtractMethod\ExtractMethodCommandHandler.cs (1)
131using var asyncToken = _asyncListener.BeginAsyncOperation(nameof(ExecuteCommand));
FindReferences\FindReferencesCommandHandler.cs (1)
122using var token = _asyncListener.BeginAsyncOperation(nameof(StreamingFindReferencesAsync));
GoToDefinition\AbstractGoToCommandHandler`2.cs (1)
133using var token = _listener.BeginAsyncOperation($"{GetType().Name}.{nameof(ExecuteCommandAsync)}");
GoToDefinition\GoToDefinitionCommandHandler.cs (1)
104var token = _listener.BeginAsyncOperation(nameof(ExecuteCommand));
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
48var token = _listener.BeginAsyncOperation(nameof(ExecuteCommand));
InlineRename\InlineRenameSession.cs (4)
308var asyncToken = _asyncListener.BeginAsyncOperation("UpdateReferencesTask"); 454var asyncToken = _asyncListener.BeginAsyncOperation(nameof(ApplyReplacementText)); 532var asyncToken = _asyncListener.BeginAsyncOperation(nameof(UpdateConflictResolutionTask)); 562var asyncToken = _asyncListener.BeginAsyncOperation(nameof(QueueApplyReplacements));
IntelliSense\AbstractController.cs (1)
97IAsyncToken IController<TModel>.BeginAsyncOperation(string name, object tag, string filePath, int lineNumber)
IntelliSense\Helpers.cs (1)
201using var token = asyncListener.BeginAsyncOperation(nameof(NavigateToQuickInfoTargetAsync));
IntelliSense\IController.cs (1)
15IAsyncToken BeginAsyncOperation(string name = "", object tag = null, [CallerFilePath] string filePath = "", [CallerLineNumber] int lineNumber = 0);
IntelliSense\ModelComputation.cs (1)
141var asyncToken = _controller.BeginAsyncOperation();
LanguageServer\AlwaysActiveLanguageClientEventListener.cs (1)
60using var token = _asynchronousOperationListener.BeginAsyncOperation(nameof(LoadAsync));
NavigateTo\NavigateToHelpers.cs (1)
23var token = asyncListener.BeginAsyncOperation(nameof(NavigateTo));
NavigationBar\NavigationBarController.cs (1)
237var token = _asyncListener.BeginAsyncOperation(nameof(OnItemSelected));
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (2)
80var asyncToken = _asyncListener.BeginAsyncOperation(GetType().Name + ".UpdateTrackingSessionAfterIsRenamableIdentifierTask"); 108var asyncToken = _asyncListener.BeginAsyncOperation($"{GetType().Name}.{nameof(QueueUpdateToStateMachine)}");
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (9)
NavigableSymbolService.NavigableSymbol.cs (1)
50var token = _service._listener.BeginAsyncOperation(nameof(NavigateAsync));
NavigationCommandHandlers\FindBaseSymbolsCommandHandler.cs (1)
68using var token = _asyncListener.BeginAsyncOperation(nameof(StreamingFindBaseSymbolsAsync));
NavigationCommandHandlers\FindDerivedSymbolsCommandHandler.cs (1)
89using var token = _asyncListener.BeginAsyncOperation(nameof(FindDerivedSymbolsAsync));
NavigationCommandHandlers\FindExtensionMethodsCommandHandler.cs (1)
72using var token = _asyncListener.BeginAsyncOperation(nameof(FindExtensionMethodsAsync));
NavigationCommandHandlers\FindImplementingMembersCommandHandler.cs (1)
69using var token = _asyncListener.BeginAsyncOperation(nameof(FindImplementingMembersAsync));
NavigationCommandHandlers\FindMemberOverloadsCommandHandler.cs (1)
63using var token = _asyncListener.BeginAsyncOperation(nameof(FindMemberOverloadsAsync));
NavigationCommandHandlers\FindReferencesOfOverloadsCommandHandler.cs (1)
102using var token = _asyncListener.BeginAsyncOperation(nameof(StreamingFindReferencesAsync));
SuggestedAction.cs (1)
115using var token = SourceProvider.OperationListener.BeginAsyncOperation($"{nameof(SuggestedAction)}.{nameof(Invoke)}");
SuggestedActionsSource.cs (1)
531using var asyncToken = state.Target.Owner.OperationListener.BeginAsyncOperation(nameof(GetSuggestedActionCategoriesAsync));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
AbstractCommandHandlerTestState.cs (1)
231/// Used in synchronous methods to ensure all outstanding <see cref="IAsyncToken"/> work has been
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (16)
SolutionCrawler\WorkCoordinatorTests.cs (3)
830var token = listenerProvider.GetListener(FeatureAttribute.SolutionCrawlerLegacy).BeginAsyncOperation("Test operation"); 885var token = listenerProvider.GetListener(FeatureAttribute.SolutionCrawlerLegacy).BeginAsyncOperation("Test operation"); 1463var token = listenerProvider.GetListener(FeatureAttribute.SolutionCrawlerLegacy).BeginAsyncOperation("Test operation");
Utilities\AsynchronousOperationListenerTests.cs (13)
85var asyncToken = listener.BeginAsyncOperation("Test"); 107var asyncToken1 = listener.BeginAsyncOperation("Test"); 113var asyncToken2 = listener.BeginAsyncOperation("Test"); 140var asyncToken1 = listener.BeginAsyncOperation("Test"); 145var asyncToken2 = listener.BeginAsyncOperation("Test"); 173var asyncToken1 = listener.BeginAsyncOperation("Test"); 208var asyncToken1 = listener.BeginAsyncOperation("Test"); 214var asyncToken2 = listener.BeginAsyncOperation("Test"); 218var asyncToken3 = listener.BeginAsyncOperation("Test"); 252var asyncToken1 = listener.BeginAsyncOperation("Test"); 268var asyncToken2 = listener.BeginAsyncOperation("Test"); 298var asyncToken1 = listener.BeginAsyncOperation("Test"); 308var asyncToken2 = listener.BeginAsyncOperation("Test");
Microsoft.CodeAnalysis.EditorFeatures.Wpf (5)
InlineRename\UI\Adornment\RenameFlyout.xaml.cs (1)
68var token = _listener.BeginAsyncOperation(nameof(DismissToolTipsAsync));
NavigableSymbols\NavigableSymbolService.NavigableSymbol.cs (1)
50var token = _service._listener.BeginAsyncOperation(nameof(NavigateAsync));
NavigateTo\NavigateToItemProvider.cs (1)
120var asyncToken = _asyncListener.BeginAsyncOperation(nameof(StartSearch));
Suggestions\SuggestedActions\SuggestedAction.cs (1)
115using var token = SourceProvider.OperationListener.BeginAsyncOperation($"{nameof(SuggestedAction)}.{nameof(Invoke)}");
Suggestions\SuggestedActionsSource.cs (1)
531using var asyncToken = state.Target.Owner.OperationListener.BeginAsyncOperation(nameof(GetSuggestedActionCategoriesAsync));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
IntelliSense\ModelTests.vb (1)
98Dim token = New Mock(Of IAsyncToken)(MockBehavior.Strict)
Microsoft.CodeAnalysis.Features (30)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (5)
252var newAsyncToken = Listener.BeginAsyncOperation(nameof(Enqueue), tag: _registration.Services); 315public readonly IAsyncToken AsyncToken; 317public UnitTestingData(Project project, DocumentId documentId, Document? document, SyntaxPath? changedMember, IAsyncToken asyncToken) 450public readonly IAsyncToken AsyncToken; 454public UnitTestingData(ProjectId projectId, bool needDependencyTracking, IAsyncToken asyncToken)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingWorkItem.cs (9)
53public readonly IAsyncToken AsyncToken; 78IAsyncToken asyncToken) 96public UnitTestingWorkItem(DocumentId documentId, string language, UnitTestingInvocationReasons invocationReasons, bool isLowPriority, SyntaxPath? activeMember, IAsyncToken asyncToken) 101public UnitTestingWorkItem(DocumentId documentId, string language, UnitTestingInvocationReasons invocationReasons, bool isLowPriority, IUnitTestingIncrementalAnalyzer? analyzer, IAsyncToken asyncToken) 125public UnitTestingWorkItem Retry(IAsyncToken asyncToken) 134ImmutableHashSet<IUnitTestingIncrementalAnalyzer> analyzers, bool retry, IAsyncToken asyncToken) 149public UnitTestingWorkItem WithAsyncToken(IAsyncToken asyncToken) 156public UnitTestingWorkItem ToProjectWorkItem(IAsyncToken asyncToken) 173public UnitTestingWorkItem With(ImmutableHashSet<IUnitTestingIncrementalAnalyzer> specificAnalyzers, IAsyncToken asyncToken)
NavigateTo\INavigateToSearcherHost.cs (1)
101var asyncToken = _asyncListener.BeginAsyncOperation(nameof(GetRemoteHostHydrateTask));
Shared\TestHooks\Legacy\ListenerForwarders.cs (1)
15[assembly: TypeForwardedTo(typeof(Microsoft.CodeAnalysis.Shared.TestHooks.IAsyncToken))]
Shared\Utilities\CompilationAvailableEventSource.cs (1)
64var token = _asyncListener.BeginAsyncOperation(nameof(EnsureCompilationAvailability));
SolutionCrawler\WorkCoordinator.SemanticChangeProcessor.cs (5)
251var newAsyncToken = Listener.BeginAsyncOperation(nameof(Enqueue), tag: _registration.Workspace); 314public readonly IAsyncToken AsyncToken; 316public Data(Project project, DocumentId documentId, Document? document, SyntaxPath? changedMember, IAsyncToken asyncToken) 449public readonly IAsyncToken AsyncToken; 453public Data(ProjectId projectId, bool needDependencyTracking, IAsyncToken asyncToken)
SolutionCrawler\WorkCoordinator.WorkItem.cs (8)
52public readonly IAsyncToken AsyncToken; 75IAsyncToken asyncToken) 93public WorkItem(DocumentId documentId, string language, InvocationReasons invocationReasons, bool isLowPriority, SyntaxPath? activeMember, IAsyncToken asyncToken) 98public WorkItem(DocumentId documentId, string language, InvocationReasons invocationReasons, bool isLowPriority, IIncrementalAnalyzer? analyzer, IAsyncToken asyncToken) 107public WorkItem Retry(IAsyncToken asyncToken) 116ImmutableHashSet<IIncrementalAnalyzer> specificAnalyzers, bool retry, IAsyncToken asyncToken) 143public WorkItem WithAsyncToken(IAsyncToken asyncToken) 150public WorkItem ToProjectWorkItem(IAsyncToken asyncToken)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.InProcOrRemoteHostAnalyzerRunner.cs (1)
104var asyncToken = _asyncOperationListener.BeginAsyncOperation(nameof(AnalyzeInProcAsync));
Microsoft.CodeAnalysis.Workspaces (15)
Remote\IRemoteKeepAliveService.cs (1)
32var token = listener.BeginAsyncOperation(nameof(RemoteKeepAliveSession));
Shared\TestHooks\AsynchronousOperationListener.cs (2)
94public IAsyncToken BeginAsyncOperation(string name, object? tag = null, [CallerFilePath] string filePath = "", [CallerLineNumber] int lineNumber = 0) 98IAsyncToken asyncToken;
Shared\TestHooks\AsynchronousOperationListener+DiagnosticAsyncToken.cs (1)
13/// Stores the source information for an <see cref="IAsyncToken"/> value. Helpful when
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
112/// loop, dig into the waiters and see all of the active <see cref="IAsyncToken"/> values
Shared\TestHooks\AsynchronousOperationListenerProvider+NullOperationListener.cs (1)
17public IAsyncToken BeginAsyncOperation(
Shared\TestHooks\EmptyAsyncToken.cs (1)
9public static IAsyncToken Instance { get; } = new EmptyAsyncToken();
Shared\TestHooks\IAsynchronousOperationListener.cs (1)
11IAsyncToken BeginAsyncOperation(string name, object? tag = null, [CallerFilePath] string filePath = "", [CallerLineNumber] int lineNumber = 0);
Shared\TestHooks\TaskExtensions.cs (1)
16public static Task CompletesAsyncOperation(this Task task, IAsyncToken asyncToken)
Shared\Utilities\AsyncBatchingWorkQueue`2.cs (1)
192using var _ = _asyncListener.BeginAsyncOperation(nameof(AddWork));
Utilities\TaskQueue.cs (2)
35private IAsyncToken BeginOperation(string taskName) 38private static TTask EndOperation<TTask>(IAsyncToken token, TTask task) where TTask : Task
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
620using var asyncToken = WorkspaceListener.BeginAsyncOperation(nameof(StartRefreshingMetadataReferencesForFile));
Workspace\Workspace_Editor.cs (2)
435var token = _taskQueue.Listener.BeginAsyncOperation(nameof(OnSourceGeneratedDocumentOpened)); 455var token = _taskQueue.Listener.BeginAsyncOperation(nameof(OnSourceGeneratedDocumentClosed));
Microsoft.VisualStudio.IntegrationTest.Setup (3)
AsyncCompletionTracker.cs (2)
47var token = listener.BeginAsyncOperation(nameof(IAsyncCompletionBroker.CompletionTriggered)); 57=> Interlocked.Exchange<IAsyncToken?>(ref token, null)?.Dispose();
IntegrationTestServiceCommands.cs (1)
233using var _ = _asynchronousOperationListener.BeginAsyncOperation("OnBeforeSaveAsync");
Microsoft.VisualStudio.LanguageServices (28)
CallHierarchy\CallHierarchyCommandHandler.cs (1)
65var token = _listener.BeginAsyncOperation(nameof(ExecuteCommand));
CallHierarchy\CallHierarchyDetail.cs (1)
67var token = _provider.AsyncListener.BeginAsyncOperation(nameof(NavigateTo));
CallHierarchy\CallHierarchyItem.cs (1)
138var token = _provider.AsyncListener.BeginAsyncOperation(nameof(NavigateTo));
CallHierarchy\Finders\AbstractCallFinder.cs (1)
58var asyncToken = _asyncListener.BeginAsyncOperation(this.GetType().Name + ".Search");
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.WorkspaceEventListener.cs (1)
50var token = _listener.BeginAsyncOperation(nameof(InitializeWorkspaceAsync));
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
346var asyncToken = _listener.BeginAsyncOperation($"{nameof(VisualStudioDiagnosticAnalyzerService)}_{nameof(RunAnalyzers)}");
ErrorReporting\VisualStudioErrorReportingService.cs (1)
80using var _ = _listener.BeginAsyncOperation(nameof(LogGlobalErrorToActivityLog));
ErrorReporting\VisualStudioInfoBar.cs (1)
52using var _ = _listener.BeginAsyncOperation(nameof(ShowInfoBar));
FindReferences\FindReferencesTableControlEventProcessorProvider.cs (1)
78using var token = listener.BeginAsyncOperation(nameof(ProcessNavigateAsync));
InheritanceMargin\MarginGlyph\InheritanceMarginContextMenu.xaml.cs (1)
53var token = _listener.BeginAsyncOperation(nameof(TargetMenuItem_OnClick));
Interop\CleanableWeakComHandleTable.cs (1)
63using var _ = listener.BeginAsyncOperation(nameof(CleanUpDeadObjectsAsync));
Library\AbstractObjectList.cs (1)
320var asyncToken = asynchronousOperationListener.BeginAsyncOperation(nameof(IVsSimpleObjectList2) + "." + nameof(IVsSimpleObjectList2.GoToSource));
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (1)
494var asyncToken = asynchronousOperationListener.BeginAsyncOperation(nameof(AbstractObjectBrowserLibraryManager) + "." + nameof(TryExec));
NavigateTo\RoslynSearchItemsSource.cs (1)
48using var token = _provider._asyncListener.BeginAsyncOperation(nameof(PerformSearchAsync));
Packaging\PackageInstallerServiceFactory_UndoRedo.cs (1)
98var token = this.packageInstallerService._listener.BeginAsyncOperation($"{GetType().Name}.{nameof(Do)}");
Progression\GraphProvider.cs (1)
170var asyncToken = _asyncListener.BeginAsyncOperation(nameof(BeginGetGraphData));
ProjectSystem\OpenTextBufferProvider.cs (1)
74var asyncToken = listener.BeginAsyncOperation(nameof(CheckForExistingOpenDocumentsAsync));
ProjectSystem\RuleSets\VisualStudioRuleSetManager.RuleSetFile.cs (1)
186using var _ = _ruleSetManager._listener.BeginAsyncOperation("IncludeUpdated");
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
1512using var asyncToken = _workspaceListener.BeginAsyncOperation(nameof(RefreshProjectExistsUIContextForLanguageAsync));
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
378var token = _asynchronousOperationListener.BeginAsyncOperation(nameof(CheckForAddedFileBeingOpenMaybeAsync));
RoslynPackage.cs (1)
189using var token = listenerProvider.GetListener(FeatureAttribute.Workspace).BeginAsyncOperation(nameof(LoadOptionPersistersAsync));
Snippets\AbstractSnippetInfoService.cs (1)
118using var token = _waiter.BeginAsyncOperation(GetType().Name + ".Start");
TableDataSource\Suppression\VisualStudioDiagnosticListTableCommandHandler.cs (1)
197using var token = _listener.BeginAsyncOperation(nameof(SetSeverityHandlerAsync));
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
257using var token = _listener.BeginAsyncOperation(nameof(ApplySuppressionFix));
TableDataSource\VisualStudioDiagnosticListTable.cs (1)
58using var asyncToken = _asynchronousOperationListener.BeginAsyncOperation(nameof(VisualStudioDiagnosticListTableWorkspaceEventListener) + "." + nameof(StartListening));
ValueTracking\ValueTrackedTreeItemViewModel.cs (1)
170var token = _listener.BeginAsyncOperation(nameof(NavigateTo));
Workspace\SourceGeneratedFileManager.cs (1)
423var asyncToken = _fileManager._listener.BeginAsyncOperation(nameof(OpenSourceGeneratedFile) + "." + nameof(OnWorkspaceChanged));
Workspace\VisualStudioWorkspaceStatusServiceFactory.cs (1)
117using var asyncToken = listener.BeginAsyncOperation("StatusChanged_EventSubscription");
Microsoft.VisualStudio.LanguageServices.Implementation (3)
SolutionExplorer\AnalyzersCommandHandler.cs (1)
400using var asyncToken = _listener.BeginAsyncOperation(nameof(SetSeverityHandler));
SolutionExplorer\SourceGeneratedFileItems\SourceGeneratedFileItemSource.cs (2)
166var asyncToken = _asyncListener.BeginAsyncOperation(nameof(SourceGeneratedFileItemSource) + "." + nameof(BeforeExpand)); 233var asyncToken = _asyncListener.BeginAsyncOperation(nameof(SourceGeneratedFileItemSource) + "." + nameof(OnWorkpaceChanged));
Microsoft.VisualStudio.LanguageServices.New.IntegrationTests (1)
InProcess\WorkspaceInProcess.cs (1)
208using var _ = _asynchronousOperationListener.BeginAsyncOperation("OnBeforeSaveAsync");