ActivityDelegate 類別

定義

表示活動的回呼。

public ref class ActivityDelegate abstract
[System.Windows.Markup.ContentProperty("Handler")]
public abstract class ActivityDelegate
[<System.Windows.Markup.ContentProperty("Handler")>]
type ActivityDelegate = class
Public MustInherit Class ActivityDelegate
繼承
ActivityDelegate
衍生
屬性

備註

活動委派可讓活動作者使用特定的簽章以公開回呼,活動使用者可據此提供活動處理常式。 活動委派有兩種型別:用來叫用沒有傳回值之活動的 ActivityAction<T>,以及用來叫用有傳回值之活動的ActivityFunc<TResult>。 在限制子活動必須擁有簽章的案例中,活動委派非常實用。

建構函式

ActivityDelegate()

由衍生類別的建構函式呼叫,以初始化物件。

屬性

DisplayName

取得或設定選擇性的易記名稱,這個名稱會用於偵錯、驗證、例外狀況處理及追蹤。

Handler

取得或設定由這個 ActivityDelegate 表示的活動。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetResultArgument()

在衍生類別中實作時,會傳回 DelegateOutArgumentActivityDelegate

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
OnGetRuntimeDelegateArguments(IList<RuntimeDelegateArgument>)

提供 ActivityDelegate 的執行階段引數清單。

ShouldSerializeDisplayName()

表示 DisplayName 屬性值是否應序列化為 XAML。

ToString()

傳回 StringActivityDelegate 表示,其中包含 DisplayName

適用於