語言

DispatcherExtensions.BeginInvoke 方法

定義

在建立執行 Dispatcher 緒的執行緒上非同步執行指定的代理。

多載

名稱 Description
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) 的物件。

屬性

例外狀況

action 是 null。

適用於

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) 的物件。

屬性

例外狀況

action 是 null。

priority 不是有效的 DispatcherPriority。

適用於