DispatcherExtensions.BeginInvoke 方法

定义

在创建的线程 Dispatcher 上异步执行指定的委托。

重载

名称 说明
BeginInvoke(Dispatcher, Action)

以异步方式执行指定的委托,该委托在创建指定的 Dispatcher 线程上具有正常优先级。

BeginInvoke(Dispatcher, Action, DispatcherPriority)

以异步方式执行指定的委托,该委托在创建指定的线程上具有指定的 Dispatcher 优先级。

BeginInvoke(Dispatcher, Action)

以异步方式执行指定的委托,该委托在创建指定的 Dispatcher 线程上具有正常优先级。

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

参数

dispatcher
Dispatcher

执行委托的调度程序。

action
Action

要执行的委托,该委托不采用任何参数,并且不返回值。

返回

一个 IAsyncResult 表示操作结果 BeginInvoke(Dispatcher, Action) 的对象。

属性

例外

actionnull

适用于

BeginInvoke(Dispatcher, Action, DispatcherPriority)

以异步方式执行指定的委托,该委托在创建指定的线程上具有指定的 Dispatcher 优先级。

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

参数

dispatcher
Dispatcher

执行委托的调度程序。

action
Action

要执行的委托,该委托不采用任何参数,并且不返回值。

priority
DispatcherPriority

委托相对于事件队列中的其他 Dispatcher 挂起操作的执行优先级。

返回

一个 IAsyncResult 表示操作结果 BeginInvoke(Dispatcher, Action, DispatcherPriority) 的对象。

属性

例外

actionnull

priority 不是有效的 DispatcherPriority

适用于