Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Microsoft.​Extensions.​Hosting.​IHostedLifecycleService
Assembly: Microsoft.Extensions.Hosting.Abstractions
Implemented Interfaces
Defines methods that are run before or after <see cref="M:Microsoft.Extensions.Hosting.IHostedService.StartAsync(System.Threading.CancellationToken)" /> and <see cref="M:Microsoft.Extensions.Hosting.IHostedService.StopAsync(System.Threading.CancellationToken)" /> .
Methods
StartedAsync​(System.​Threading.​CancellationToken cancellationToken)
Triggered after <see cref="M:Microsoft.Extensions.Hosting.IHostedService.StartAsync(System.Threading.CancellationToken)" /> .
Returns A <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation.
cancellationToken
Indicates that the start process has been aborted.
StartingAsync​(System.​Threading.​CancellationToken cancellationToken)
Triggered before <see cref="M:Microsoft.Extensions.Hosting.IHostedService.StartAsync(System.Threading.CancellationToken)" /> .
Returns A <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation.
cancellationToken
Indicates that the start process has been aborted.
StoppedAsync​(System.​Threading.​CancellationToken cancellationToken)
Triggered after <see cref="M:Microsoft.Extensions.Hosting.IHostedService.StopAsync(System.Threading.CancellationToken)" /> .
Returns A <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation.
cancellationToken
Indicates that the stop process has been aborted.
StoppingAsync​(System.​Threading.​CancellationToken cancellationToken)
Triggered before <see cref="M:Microsoft.Extensions.Hosting.IHostedService.StopAsync(System.Threading.CancellationToken)" /> .
Returns A <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation.
cancellationToken
Indicates that the start process has been aborted.