Skip to content

ILifecycleObserver Methods

Lifecycle observer used to handle start and stop notification.

OnStart(CancellationToken)

abstract
public abstract Task OnStart(CancellationToken cancellationToken = default(CancellationToken))
Handle start notifications.

Parameters

cancellationTokenCancellationToken
The cancellation token which indicates that the operation should be aborted promptly when it is canceled.

Returns

A System.Threading.Tasks.Task which represents the operation.

OnStop(CancellationToken)

abstract
public abstract Task OnStop(CancellationToken cancellationToken = default(CancellationToken))
Handle stop notifications.

Parameters

cancellationTokenCancellationToken
The cancellation token which indicates that the operation should be stopped promptly when it is canceled.

Returns

A System.Threading.Tasks.Task which represents the operation.