IHostedService.StartAsync(CancellationToken) 方法

定义

当应用程序主机准备好启动服务时触发。

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

参数

cancellationToken
CancellationToken

指示启动进程已中止。

返回

Task

适用于