Share via


FakeHost.StopAsync(CancellationToken) Méthode

Définition

Tente d’arrêter le programme normalement.

public System.Threading.Tasks.Task StopAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member StopAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.StopAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function StopAsync (Optional cancellationToken As CancellationToken = Nothing) As Task

Paramètres

cancellationToken
CancellationToken

Utilisé pour indiquer quand l’arrêt ne doit plus être normal.

Retours

Task qui est effectué à l’arrêt de IHost.

Implémente

Exceptions

Le jeton d’annulation a été annulé. Cette exception est stockée dans la tâche retournée.

Remarques

Si aucun jeton d’annulation n’est donné, un nouveau jeton est StartUpTimeout utilisé.

S’applique à