IHostedService.StartAsync(CancellationToken) Metodo

Definizione

Oggetto attivato quando l'host applicazione è pronto per l'avvio del servizio.

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

Parametri

cancellationToken
CancellationToken

Indica che il processo di avvio è stato interrotto.

Restituisce

Oggetto Task che rappresenta l'operazione Start asincrona.

Eccezioni

Il token di annullamento è stato annullato. Questa eccezione viene archiviata nell'attività restituita.

Si applica a