DispatcherExtensions.BeginInvoke Metod

Definition

Kör det angivna ombudet asynkront på den tråd som Dispatcher skapades på.

Överlagringar

Name Description
BeginInvoke(Dispatcher, Action)

Kör det angivna ombudet asynkront med normal prioritet i tråden som den angivna Dispatcher skapades på.

BeginInvoke(Dispatcher, Action, DispatcherPriority)

Kör det angivna ombudet asynkront med den angivna prioriteten i tråden som den angivna Dispatcher skapades på.

BeginInvoke(Dispatcher, Action)

Kör det angivna ombudet asynkront med normal prioritet i tråden som den angivna Dispatcher skapades på.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Threading::DispatcherOperation ^ BeginInvoke(System::Windows::Threading::Dispatcher ^ dispatcher, Action ^ action);
public static System.Windows.Threading.DispatcherOperation BeginInvoke(this System.Windows.Threading.Dispatcher dispatcher, Action action);
[System.ComponentModel.Browsable(false)]
public static System.Windows.Threading.DispatcherOperation BeginInvoke(this System.Windows.Threading.Dispatcher dispatcher, Action action);
static member BeginInvoke : System.Windows.Threading.Dispatcher * Action -> System.Windows.Threading.DispatcherOperation
[<System.ComponentModel.Browsable(false)>]
static member BeginInvoke : System.Windows.Threading.Dispatcher * Action -> System.Windows.Threading.DispatcherOperation
<Extension()>
Public Function BeginInvoke (dispatcher As Dispatcher, action As Action) As DispatcherOperation

Parametrar

dispatcher
Dispatcher

Avsändaren som kör ombudet.

action
Action

Ombudet som ska köras, som inte tar några argument och inte returnerar ett värde.

Returer

Ett IAsyncResult objekt som representerar resultatet av åtgärden BeginInvoke(Dispatcher, Action) .

Attribut

Undantag

action är null.

Gäller för

BeginInvoke(Dispatcher, Action, DispatcherPriority)

Kör det angivna ombudet asynkront med den angivna prioriteten i tråden som den angivna Dispatcher skapades på.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Threading::DispatcherOperation ^ BeginInvoke(System::Windows::Threading::Dispatcher ^ dispatcher, Action ^ action, System::Windows::Threading::DispatcherPriority priority);
public static System.Windows.Threading.DispatcherOperation BeginInvoke(this System.Windows.Threading.Dispatcher dispatcher, Action action, System.Windows.Threading.DispatcherPriority priority);
[System.ComponentModel.Browsable(false)]
public static System.Windows.Threading.DispatcherOperation BeginInvoke(this System.Windows.Threading.Dispatcher dispatcher, Action action, System.Windows.Threading.DispatcherPriority priority);
static member BeginInvoke : System.Windows.Threading.Dispatcher * Action * System.Windows.Threading.DispatcherPriority -> System.Windows.Threading.DispatcherOperation
[<System.ComponentModel.Browsable(false)>]
static member BeginInvoke : System.Windows.Threading.Dispatcher * Action * System.Windows.Threading.DispatcherPriority -> System.Windows.Threading.DispatcherOperation
<Extension()>
Public Function BeginInvoke (dispatcher As Dispatcher, action As Action, priority As DispatcherPriority) As DispatcherOperation

Parametrar

dispatcher
Dispatcher

Avsändaren som kör ombudet.

action
Action

Ombudet som ska köras, som inte tar några argument och inte returnerar ett värde.

priority
DispatcherPriority

Körningsprioriteten för ombudet i förhållande till andra väntande åtgärder i Dispatcher händelsekön.

Returer

Ett IAsyncResult objekt som representerar resultatet av åtgärden BeginInvoke(Dispatcher, Action, DispatcherPriority) .

Attribut

Undantag

action är null.

priority är inte ett giltigt DispatcherPriority.

Gäller för