SystemdLifetime.WaitForStartAsync(CancellationToken) Methode

Definition

Wartet asynchron, bis der Startvorgang abgeschlossen ist, bevor der Vorgang fortgesetzt wird. Diese Methode wird am Anfang von StartAsync(CancellationToken) aufgerufen. Dies kann verwendet werden, um den Start zu verzögern, bis dieser durch ein externes Ereignis initiiert wird.

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

Parameter

cancellationToken
CancellationToken

Ein Abbruchtoken, das angibt, wann das Beenden nicht mehr ordnungsgemäß ist.

Gibt zurück

Ein Task, der das Warten auf den Startvorgang darstellt.

Implementiert

Ausnahmen

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

Gilt für: