ExtensibilityDiagnosticManager<T>.CreateAsync<TManager> Method

Definition

Creates and initializes an instance of TManager.

public static System.Threading.Tasks.Task<TManager> CreateAsync<TManager> (Microsoft.VisualStudio.Shell.Internal.ExtensibilityDiagnosticsLoggerConfiguration diagnosticsLogger, Func<Microsoft.VisualStudio.Shell.Internal.ExtensibilityDiagnosticsLoggerConfiguration,TManager> creator, System.Threading.CancellationToken cancellationToken) where TManager : Microsoft.VisualStudio.Shell.Internal.ExtensibilityDiagnosticManager<T>;
static member CreateAsync : Microsoft.VisualStudio.Shell.Internal.ExtensibilityDiagnosticsLoggerConfiguration * Func<Microsoft.VisualStudio.Shell.Internal.ExtensibilityDiagnosticsLoggerConfiguration, 'Manager (requires 'Manager :> Microsoft.VisualStudio.Shell.Internal.ExtensibilityDiagnosticManager<'T>)> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Manager (requires 'Manager :> Microsoft.VisualStudio.Shell.Internal.ExtensibilityDiagnosticManager<'T>)> (requires 'Manager :> Microsoft.VisualStudio.Shell.Internal.ExtensibilityDiagnosticManager<'T>)
Public Shared Function CreateAsync(Of TManager As ExtensibilityDiagnosticManager(Of T)) (diagnosticsLogger As ExtensibilityDiagnosticsLoggerConfiguration, creator As Func(Of ExtensibilityDiagnosticsLoggerConfiguration, TManager), cancellationToken As CancellationToken) As Task(Of TManager)

Type Parameters

TManager

The diagnostics manager to create.

Parameters

diagnosticsLogger
ExtensibilityDiagnosticsLoggerConfiguration

The configuration object used to log diagnostics.

creator
Func<ExtensibilityDiagnosticsLoggerConfiguration,TManager>

A delegate that should call the constructor of the diagnostics manager but not call InitializeAsync(CancellationToken).

cancellationToken
CancellationToken

A token to signal cancellation.

Returns

Task<TManager>

A task to track the async work.

Applies to