Share via


WebHostExtensions.WaitForShutdownAsync(IWebHost, CancellationToken) Methode

Definition

Gibt einen Vorgang zurück, der abgeschlossen wird, wenn das Herunterfahren über das angegebene Token, STRG+C oder SIGTERM ausgelöst wird.

public static System.Threading.Tasks.Task WaitForShutdownAsync (this Microsoft.AspNetCore.Hosting.IWebHost host, System.Threading.CancellationToken token = default);
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 = Nothing) As Task

Parameter

host
IWebHost

Die IWebHost-Schnittstelle, die ausgeführt wird.

token
CancellationToken

Das Token, das das Herunterfahren auslösen soll.

Gibt zurück

Eine Task , die abgeschlossen wird, wenn das Herunterfahren über STRG+C oder SIGTERM ausgelöst wird.

Gilt für: