TaskExtensions.DispatcherOperationWait Metod

Definition

Väntar på att den underliggande ska DispatcherOperation slutföras.

Överlagringar

Name Description
DispatcherOperationWait(Task)

Väntar på obestämd tid för att den underliggande ska DispatcherOperation slutföras.

DispatcherOperationWait(Task, TimeSpan)

Väntar på den angivna tiden för att den underliggande ska DispatcherOperation slutföras.

DispatcherOperationWait(Task)

Väntar på obestämd tid för att den underliggande ska DispatcherOperation slutföras.

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

Parametrar

this
Task

Det Task som är associerat med DispatcherOperation.

Returer

Status för den underliggande DispatcherOperation.

Undantag

Task är inte associerad med en DispatcherOperation.

Kommentarer

IsDispatcherOperationTask Anropa metoden för att kontrollera om Task är associerad med en DispatcherOperation innan du anropar den här metoden.

Gäller för

DispatcherOperationWait(Task, TimeSpan)

Väntar på den angivna tiden för att den underliggande ska DispatcherOperation slutföras.

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

Parametrar

this
Task

Det Task som är associerat med DispatcherOperation.

timeout
TimeSpan

Hur lång tid det ska ta att vänta.

Returer

Status för den underliggande DispatcherOperation.

Undantag

Task är inte associerad med en DispatcherOperation.

Kommentarer

IsDispatcherOperationTask Anropa metoden för att kontrollera om Task är associerad med en DispatcherOperation innan du anropar den här metoden.

Gäller för