TaskExtensions.DispatcherOperationWait Metoda

Definice

Čeká na dokončení podkladu DispatcherOperation .Waits for the underlying DispatcherOperation to complete.

Přetížení

DispatcherOperationWait(Task)

Počká po neomezenou dobu, než DispatcherOperation se podklade dokončí.Waits indefinitely for the underlying DispatcherOperation to complete.

DispatcherOperationWait(Task, TimeSpan)

Počká na určenou dobu, než se podkladová DispatcherOperation hodnota dokončí.Waits for the specified amount of time for the underlying DispatcherOperation to complete.

DispatcherOperationWait(Task)

Počká po neomezenou dobu, než DispatcherOperation se podklade dokončí.Waits indefinitely for the underlying DispatcherOperation to complete.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Threading::DispatcherOperationStatus DispatcherOperationWait(System::Threading::Tasks::Task ^ this);
public static System.Windows.Threading.DispatcherOperationStatus DispatcherOperationWait (this System.Threading.Tasks.Task this);
static member DispatcherOperationWait :  -> System.Windows.Threading.DispatcherOperationStatus
<Extension()>
Public Function DispatcherOperationWait (this As Task) As DispatcherOperationStatus

Parametry

this
Task

, Který je spojen DispatcherOperations. TaskThe Task that is associated with the DispatcherOperation.

Návraty

Stav podkladové DispatcherOperation.The status of the underlying DispatcherOperation.

Výjimky

Task Není přidružen DispatcherOperationk.The Task is not associated with a DispatcherOperation.

Poznámky

Zavolejte metodu pro kontrolu Task , zda je před voláním této metody asociována s objektem. DispatcherOperation IsDispatcherOperationTaskCall the IsDispatcherOperationTask method to check whether the Task is associated with a DispatcherOperation before you call this method.

DispatcherOperationWait(Task, TimeSpan)

Počká na určenou dobu, než se podkladová DispatcherOperation hodnota dokončí.Waits for the specified amount of time for the underlying DispatcherOperation to complete.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Threading::DispatcherOperationStatus DispatcherOperationWait(System::Threading::Tasks::Task ^ this, TimeSpan timeout);
public static System.Windows.Threading.DispatcherOperationStatus DispatcherOperationWait (this System.Threading.Tasks.Task this, TimeSpan timeout);
static member DispatcherOperationWait : TimeSpan -> System.Windows.Threading.DispatcherOperationStatus
<Extension()>
Public Function DispatcherOperationWait (this As Task, timeout As TimeSpan) As DispatcherOperationStatus

Parametry

this
Task

, Který je spojen DispatcherOperations. TaskThe Task that is associated with the DispatcherOperation.

timeout
TimeSpan

Doba, po kterou se má čekat.The amount of time to wait.

Návraty

Stav podkladové DispatcherOperation.The status of the underlying DispatcherOperation.

Výjimky

Task Není přidružen DispatcherOperationk.The Task is not associated with a DispatcherOperation.

Poznámky

Zavolejte metodu pro kontrolu Task , zda je před voláním této metody asociována s objektem. DispatcherOperation IsDispatcherOperationTaskCall the IsDispatcherOperationTask method to check whether the Task is associated with a DispatcherOperation before you call this method.

Platí pro