HostingAbstractionsHostExtensions.WaitForShutdownAsync(IHost, CancellationToken) 메서드

정의

지정된 토큰을 통해 종료가 트리거될 때 완료되는 작업을 반환합니다.Returns a Task that completes when shutdown is triggered via the given token.

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

매개 변수

host
IHost

실행 중인 IHost입니다.The running IHost.

token
CancellationToken

종료를 트리거할 토큰입니다.The token to trigger shutdown.

반환

비동기 작업을 나타내는 Task입니다.The Task that represents the asynchronous operation.

적용 대상