IHostLifetime.WaitForStartAsync(CancellationToken) 方法

定义

StartAsync(CancellationToken) 开始时调用,在继续之前,会一直等待该操作完成。Called at the start of StartAsync(CancellationToken) which will wait until it's complete before continuing. 它可用于延迟启动,直到外部事件发出信号。This can be used to delay startup until signaled by an external event.

public:
 System::Threading::Tasks::Task ^ WaitForStartAsync(System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task WaitForStartAsync (System.Threading.CancellationToken cancellationToken);
abstract member WaitForStartAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function WaitForStartAsync (cancellationToken As CancellationToken) As Task

参数

cancellationToken
CancellationToken

用于指示停止应不再正常的时间。Used to indicate when stop should no longer be graceful.

返回

Task

TaskA Task.

适用于