IHostedService.StartAsync(CancellationToken) 方法

定義

當應用程式主機準備好啟動服務時觸發。Triggered when the application host is ready to start the service.

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

指出已中止啟動流程。Indicates that the start process has been aborted.

傳回

Task

適用於