BackgroundService.StartAsync(CancellationToken) Metodo

Definizione

Attivato quando l'host dell'applicazione è pronto per avviare il servizio.

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

Parametri

cancellationToken
CancellationToken

Indica che il processo di avvio è stato interrotto.

Valori restituiti

Oggetto Task che rappresenta l'operazione di avvio asincrona.

Implementazioni

Eccezioni

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

Si applica a