WebHostExtensions.WaitForShutdownAsync(IWebHost, CancellationToken) WebHostExtensions.WaitForShutdownAsync(IWebHost, CancellationToken) WebHostExtensions.WaitForShutdownAsync(IWebHost, CancellationToken) Method

Definition

Returns a Task that completes when shutdown is triggered via the given token, Ctrl+C or SIGTERM.

public static System.Threading.Tasks.Task WaitForShutdownAsync (this Microsoft.AspNetCore.Hosting.IWebHost host, System.Threading.CancellationToken token = null);
static member WaitForShutdownAsync : Microsoft.AspNetCore.Hosting.IWebHost * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WaitForShutdownAsync (host As IWebHost, Optional token As CancellationToken = null) As Task

Parameters

host
IWebHost IWebHost IWebHost

The running IWebHost.

token
CancellationToken CancellationToken CancellationToken

The token to trigger shutdown.

Returns

Applies to