BackgroundService.StartAsync(CancellationToken) Methode

Definition

Wird ausgelöst, wenn der Anwendungshost bereit ist, den Dienst zu starten.

public:
 virtual System::Threading::Tasks::Task ^ StartAsync(System::Threading::CancellationToken cancellationToken);
public virtual System.Threading.Tasks.Task StartAsync (System.Threading.CancellationToken cancellationToken);
abstract member StartAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.StartAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function StartAsync (cancellationToken As CancellationToken) As Task

Parameter

cancellationToken
CancellationToken

Gibt an, dass der Startprozess abgebrochen wurde.

Gibt zurück

Ein Task , der den asynchronen Startvorgang darstellt.

Implementiert

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Gilt für: