Share via


IHostLifetime.StopAsync(CancellationToken) Metodo

Definizione

Chiamato da StopAsync(CancellationToken) per indicare che l'host è in fase di arresto e deve essere arrestato.

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

Parametri

cancellationToken
CancellationToken

Oggetto usato per indicare quando l'arresto non deve più essere normale.

Restituisce

Oggetto Task.

Eccezioni

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

Si applica a