HostingAbstractionsHostExtensions.RunAsync(IHost, CancellationToken) 메서드

정의

토큰이 트리거되거나 종료가 트리거되는 경우에만 완료되는 애플리케이션을 실행하고 작업을 반환합니다.Runs an application and returns a Task that only completes when the token is triggered or shutdown is triggered.

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

매개 변수

host
IHost

실행할 IHost입니다.The IHost to run.

token
CancellationToken

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

반환

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

적용 대상