Share via


AsyncPackage.OnAfterPackageLoadedAsync(CancellationToken) Method

Definition

When overridden by a derived class, may initiate operations with side effects that are not strictly part of package load that would belong to InitializeAsync(CancellationToken, IProgress<ServiceProgressData>) that should happen soon after package load (e.g. updating command status). This method is invoked from a background thread.

protected:
 virtual System::Threading::Tasks::Task ^ OnAfterPackageLoadedAsync(System::Threading::CancellationToken cancellationToken);
protected virtual System.Threading.Tasks.Task OnAfterPackageLoadedAsync (System.Threading.CancellationToken cancellationToken);
abstract member OnAfterPackageLoadedAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnAfterPackageLoadedAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnAfterPackageLoadedAsync (cancellationToken As CancellationToken) As Task

Parameters

cancellationToken
CancellationToken

The package's DisposalToken.

Returns

A task representing the additional asynchronously work of the package or an already completed task if there is none. Do not return null from this method.

Exceptions

cancellationToken has been canceled.

Remarks

The default implementation of this method does nothing and there is no requirement to call it in an override.

Applies to