IHostLifetime.WaitForStartAsync(CancellationToken) Metodo

Definizione

Chiamato all'inizio del quale attenderà il completamento prima di StartAsync(CancellationToken) continuare. Questo è utile per ritardare l'avvio fino al segnale trasmesso da un evento esterno.

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

Parametri

cancellationToken
CancellationToken

Usato per interrompere l'avvio del programma.

Valori restituiti

Un oggetto Task.

Eccezioni

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

Si applica a