Condividi tramite


ExtensionCore.OnInitializedAsync Method

Definition

Called when extension is initialized to allow for registering components asynchronously. This method will not block extension from returning services such as command sets so any initialization required for service collection should be done in InitializeServices(IServiceCollection) instead.

protected virtual System.Threading.Tasks.Task OnInitializedAsync (Microsoft.VisualStudio.Extensibility.VisualStudioExtensibility extensibility, System.Threading.CancellationToken cancellationToken);
abstract member OnInitializedAsync : Microsoft.VisualStudio.Extensibility.VisualStudioExtensibility * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnInitializedAsync : Microsoft.VisualStudio.Extensibility.VisualStudioExtensibility * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnInitializedAsync (extensibility As VisualStudioExtensibility, cancellationToken As CancellationToken) As Task

Parameters

extensibility
VisualStudioExtensibility

Extensibility object to utilize if needed.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

Task indicating completion.

Applies to