TaskExtensions.DispatcherOperationWait Metodo

Definizione

Attende il completamento della DispatcherOperation sottostante.Waits for the underlying DispatcherOperation to complete.

Overload

DispatcherOperationWait(Task)

Attende in modo indefinito il completamento di DispatcherOperation.Waits indefinitely for the underlying DispatcherOperation to complete.

DispatcherOperationWait(Task, TimeSpan)

Attende il tempo specificato per il completamento della DispatcherOperation sottostante.Waits for the specified amount of time for the underlying DispatcherOperation to complete.

DispatcherOperationWait(Task)

Attende in modo indefinito il completamento di DispatcherOperation.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

Parametri

this
Task

Task associato a DispatcherOperation.The Task that is associated with the DispatcherOperation.

Restituisce

Stato dell'oggetto sottostante DispatcherOperation.The status of the underlying DispatcherOperation.

Eccezioni

Task non è associato a DispatcherOperation.The Task is not associated with a DispatcherOperation.

Commenti

Chiamare il IsDispatcherOperationTask metodo per verificare se l' Task oggetto è associato a DispatcherOperation un oggetto prima di chiamare questo metodo.Call the IsDispatcherOperationTask method to check whether the Task is associated with a DispatcherOperation before you call this method.

DispatcherOperationWait(Task, TimeSpan)

Attende il tempo specificato per il completamento della DispatcherOperation sottostante.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

Parametri

this
Task

Task associato a DispatcherOperation.The Task that is associated with the DispatcherOperation.

timeout
TimeSpan

Quantità di tempo di attesa.The amount of time to wait.

Restituisce

Stato dell'oggetto sottostante DispatcherOperation.The status of the underlying DispatcherOperation.

Eccezioni

Task non è associato a DispatcherOperation.The Task is not associated with a DispatcherOperation.

Commenti

Chiamare il IsDispatcherOperationTask metodo per verificare se l' Task oggetto è associato a DispatcherOperation un oggetto prima di chiamare questo metodo.Call the IsDispatcherOperationTask method to check whether the Task is associated with a DispatcherOperation before you call this method.

Si applica a