語言

DispatcherExtensions.Invoke 方法

定義

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

多載

名稱 Description
Invoke(Dispatcher, Action)

以正常優先權同步執行指定的代理,執行該執行 Dispatcher 緒所建立的執行緒。

Invoke(Dispatcher, Action, TimeSpan)

在該執行緒建立的執行緒 Dispatcher 上同步執行指定的代理,並在指定的逾時後停止執行。

Invoke(Dispatcher, Action, DispatcherPriority)

在該執行緒 Dispatcher 上,以指定的優先權同步執行指定的代理。

Invoke(Dispatcher, Action, TimeSpan, DispatcherPriority)

在指定的執行緒 Dispatcher 上,以指定的優先權同步執行指定的代理,並在指定的逾時後停止執行。

Invoke(Dispatcher, Action)

以正常優先權同步執行指定的代理,執行該執行 Dispatcher 緒所建立的執行緒。

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

參數

dispatcher
Dispatcher

執行代表的調度員。

action
Action

執行的代理,不接受參數且不回傳值。

屬性

例外狀況

action 是 null。

適用於

Invoke(Dispatcher, Action, TimeSpan)

在該執行緒建立的執行緒 Dispatcher 上同步執行指定的代理,並在指定的逾時後停止執行。

public:
[System::Runtime::CompilerServices::Extension]
 static void Invoke(System::Windows::Threading::Dispatcher ^ dispatcher, Action ^ action, TimeSpan timeout);
public static void Invoke(this System.Windows.Threading.Dispatcher dispatcher, Action action, TimeSpan timeout);
[System.ComponentModel.Browsable(false)]
public static void Invoke(this System.Windows.Threading.Dispatcher dispatcher, Action action, TimeSpan timeout);
static member Invoke : System.Windows.Threading.Dispatcher * Action * TimeSpan -> unit
[<System.ComponentModel.Browsable(false)>]
static member Invoke : System.Windows.Threading.Dispatcher * Action * TimeSpan -> unit
<Extension()>
Public Sub Invoke (dispatcher As Dispatcher, action As Action, timeout As TimeSpan)

參數

dispatcher
Dispatcher

執行代表的調度員。

action
Action

執行的代理,不接受參數且不回傳值。

timeout
TimeSpan

手術完成前最長等待時間。

屬性

例外狀況

action 是 null。

priority 等於 Inactive。

priority 不是有效的 DispatcherPriority。

適用於

Invoke(Dispatcher, Action, DispatcherPriority)

在該執行緒 Dispatcher 上,以指定的優先權同步執行指定的代理。

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

參數

dispatcher
Dispatcher

執行代表的調度員。

action
Action

執行的代理,不接受參數且不回傳值。

priority
DispatcherPriority

代理的執行優先權相對於事件佇列中 Dispatcher 其他待處理操作的優先權。

屬性

例外狀況

action 是 null。

priority 等於 Inactive。

priority 不是有效的 DispatcherPriority。

適用於

Invoke(Dispatcher, Action, TimeSpan, DispatcherPriority)

在指定的執行緒 Dispatcher 上,以指定的優先權同步執行指定的代理,並在指定的逾時後停止執行。

public:
[System::Runtime::CompilerServices::Extension]
 static void Invoke(System::Windows::Threading::Dispatcher ^ dispatcher, Action ^ action, TimeSpan timeout, System::Windows::Threading::DispatcherPriority priority);
public static void Invoke(this System.Windows.Threading.Dispatcher dispatcher, Action action, TimeSpan timeout, System.Windows.Threading.DispatcherPriority priority);
[System.ComponentModel.Browsable(false)]
public static void Invoke(this System.Windows.Threading.Dispatcher dispatcher, Action action, TimeSpan timeout, System.Windows.Threading.DispatcherPriority priority);
static member Invoke : System.Windows.Threading.Dispatcher * Action * TimeSpan * System.Windows.Threading.DispatcherPriority -> unit
[<System.ComponentModel.Browsable(false)>]
static member Invoke : System.Windows.Threading.Dispatcher * Action * TimeSpan * System.Windows.Threading.DispatcherPriority -> unit
<Extension()>
Public Sub Invoke (dispatcher As Dispatcher, action As Action, timeout As TimeSpan, priority As DispatcherPriority)

參數

dispatcher
Dispatcher

執行代表的調度員。

action
Action

執行的代理,不接受參數且不回傳值。

timeout
TimeSpan

手術完成前最長等待時間。

priority
DispatcherPriority

代理的執行優先權相對於事件佇列中 Dispatcher 其他待處理操作的優先權。

屬性

例外狀況

action 是 null。

priority 等於 Inactive。

priority 不是有效的 DispatcherPriority。

適用於