IHostLifetime.StopAsync(CancellationToken) Metodo

Definizione

Chiamato da StopAsync(CancellationToken) per indicare che l'host si arresta ed è il momento di arrestarlo.

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

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

Valori restituiti

Un oggetto Task.

Eccezioni

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

Si applica a