IHostedService.StopAsync(CancellationToken) Metodo

Definizione

Attivato quando l'host dell'applicazione esegue un arresto normale.

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

Indica che il processo di arresto non deve più essere normale.

Valori restituiti

Oggetto Task che rappresenta l'operazione di arresto asincrona.

Eccezioni

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

Si applica a