ActivityDelegate 类
定义
表示基于活动的回调。Represents an activity-based callback.
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
- 派生
- 属性
注解
通过活动委托,活动作者可以公开具有特定签名的回调,活动的用户可为其提供基于活动的处理程序。Activity delegates enable activity authors to expose callbacks with specific signatures that users of the activity can provide activity-based handlers for. 有两种类型的活动委托:ActivityAction<T> 用于调用没有返回值的活动,而 ActivityFunc<TResult> 用于调用具有返回值的活动。There are two types of activity delegates: ActivityAction<T> is used for invoking activities that do not have a return value, and ActivityFunc<TResult> is used for invoking activities that do have a return value. 在必须对子活动进行限制,使其包含特定签名的情况下,活动委托非常有用。Activity delegates are useful in scenarios where a child activity must be constrained to having a certain signature.
构造函数
| ActivityDelegate() |
由派生类的构造函数调用以初始化对象。Called by derived class constructors to initialize the object. |
属性
| DisplayName |
获取或设置用于调试、验证、异常处理和跟踪的可选友好名称。Gets or sets an optional friendly name that is used for debugging, validation, exception handling, and tracking. |
| Handler |
获取或设置由此 ActivityDelegate 表示的活动。Gets or sets the activity that is represented by this ActivityDelegate. |
方法
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetResultArgument() |
在派生类中实现时,返回 DelegateOutArgument 的 ActivityDelegate。When implemented in a derived class, returns the DelegateOutArgument of the ActivityDelegate. |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| OnGetRuntimeDelegateArguments(IList<RuntimeDelegateArgument>) |
提供 ActivityDelegate 的运行时自变量列表。Supplies a list of runtime arguments for the ActivityDelegate. |
| ShouldSerializeDisplayName() |
指示 DisplayName 属性值是否应序列化为 XAML。Indicates whether the DisplayName property value should be serialized to XAML. |
| ToString() |
返回包含 String 的 ActivityDelegate 的 DisplayName 表示形式。Returns a String representation of the ActivityDelegate that contains the DisplayName. |