TaskExtensions.DispatcherOperationWait Метод

Определение

Ожидает завершения выполнения базового объекта DispatcherOperation.Waits for the underlying DispatcherOperation to complete.

Перегрузки

DispatcherOperationWait(Task)

Ожидает завершения базовой операции DispatcherOperation в течение неограниченного времени.Waits indefinitely for the underlying DispatcherOperation to complete.

DispatcherOperationWait(Task, TimeSpan)

Ожидает истечения заданного количества времени для базового DispatcherOperation.Waits for the specified amount of time for the underlying DispatcherOperation to complete.

DispatcherOperationWait(Task)

Ожидает завершения базовой операции 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

Параметры

this
Task

Task, связанный с DispatcherOperation.The Task that is associated with the DispatcherOperation.

Возвращаемое значение

DispatcherOperationStatus

Состояние базового DispatcherOperation.The status of the underlying DispatcherOperation.

Исключения

Task не связан с DispatcherOperation.The Task is not associated with a DispatcherOperation.

Комментарии

Вызовите метод IsDispatcherOperationTask, чтобы проверить, связан ли Task с DispatcherOperation перед вызовом этого метода.Call the IsDispatcherOperationTask method to check whether the Task is associated with a DispatcherOperation before you call this method.

DispatcherOperationWait(Task, TimeSpan)

Ожидает истечения заданного количества времени для базового DispatcherOperation.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

Параметры

this
Task

Task, связанный с DispatcherOperation.The Task that is associated with the DispatcherOperation.

timeout
TimeSpan

Промежуток времени для ожидания.The amount of time to wait.

Возвращаемое значение

DispatcherOperationStatus

Состояние базового DispatcherOperation.The status of the underlying DispatcherOperation.

Исключения

Task не связан с DispatcherOperation.The Task is not associated with a DispatcherOperation.

Комментарии

Вызовите метод IsDispatcherOperationTask, чтобы проверить, связан ли Task с DispatcherOperation перед вызовом этого метода.Call the IsDispatcherOperationTask method to check whether the Task is associated with a DispatcherOperation before you call this method.

Применяется к