IHostLifetime.WaitForStartAsync(CancellationToken) Methode

Definition

Wird am Anfang von StartAsync(CancellationToken) aufgerufen. Auf den Abschluss wird gewartet, bevor der Vorgang fortsetzt wird. Dies kann verwendet werden, um den Start zu verzögern, bis dieser durch ein externes Ereignis initiiert wird.

public:
 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
Public Function WaitForStartAsync (cancellationToken As CancellationToken) As Task

Parameter

cancellationToken
CancellationToken

Wird verwendet, um anzugeben, wann das Beenden nicht mehr ordnungsgemäß sein soll.

Gibt zurück

einen Task

Ausnahmen

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

Gilt für: