BackgroundService.StopAsync(CancellationToken) Metodo

Definizione

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

public:
 virtual System::Threading::Tasks::Task ^ StopAsync(System::Threading::CancellationToken cancellationToken);
public virtual System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken);
abstract member StopAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.StopAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable 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.

Implementazioni

Eccezioni

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

Si applica a