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