DynamicActivity<TResult> 类 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供一种与文档对象模型 (DOM) 一致的方法,该方法允许您使用 ICustomTypeDescriptor 以动态方式构造与 WF 设计器和工作流运行时交互的活动。
generic <typename TResult>
public ref class DynamicActivity sealed : System::Activities::Activity<TResult>, System::ComponentModel::ICustomTypeDescriptor[System.Windows.Markup.ContentProperty("Implementation")]
public sealed class DynamicActivity<TResult> : System.Activities.Activity<TResult>, System.ComponentModel.ICustomTypeDescriptor[<System.Windows.Markup.ContentProperty("Implementation")>]
type DynamicActivity<'Result> = class
    inherit Activity<'Result>
    interface ICustomTypeDescriptorPublic NotInheritable Class DynamicActivity(Of TResult)
Inherits Activity(Of TResult)
Implements ICustomTypeDescriptor类型参数
- TResult
活动返回的结果。
- 继承
- 属性
- 实现
注解
使用 DynamicActivity<TResult>,您无需创建新类型即可创建新活动。 DynamicActivity<TResult> 及 ActivityXamlServices 中与其关联的 XAML 支持,允许在 XAML 中定义新的参数并且无需编译 XAML 即可实现与主机的绑定。
构造函数
| DynamicActivity<TResult>() | 创建 DynamicActivity<TResult> 类的新实例。 | 
属性
| Attributes | 获取动态生成的活动的特性的集合。 | 
| CacheId | 获取缓存的标识符,该标识符在工作流定义的作用域内是唯一的。(继承自 Activity) | 
| Constraints | 返回配置为用于验证 Constraint 的 DynamicActivity<TResult> 活动的集合。 | 
| DisplayName | 获取或设置用于调试、验证、异常处理和跟踪的可选友好名称。(继承自 Activity) | 
| Id | 获取一个标识符,该标识符在工作流定义的作用域内是唯一的。(继承自 Activity) | 
| Implementation | 获取或设置活动的执行逻辑。 | 
| ImplementationVersion | 获取或设置活动的实现版本。 | 
| ImplementationVersion | 获取或设置用于实现的版本。(继承自 Activity) | 
| Name | 获取要在工作流设计器中显示的活动的名称。 | 
| Properties | 获取映射到动态生成的活动的自变量的属性的集合。 | 
| Result | 获取或设置 Activity<TResult> 的结果参数。(继承自 Activity<TResult>) | 
| ResultType | 在派生类中实现时,获取 OutArgument 活动的类型。(继承自 ActivityWithResult) | 
方法
| CacheMetadata(ActivityMetadata) | 创建并验证活动的自变量、变量、子活动和活动委托的说明。(继承自 Activity) | 
| Equals(Object) | 确定指定对象是否等于当前对象。(继承自 Object) | 
| GetHashCode() | 作为默认哈希函数。(继承自 Object) | 
| GetType() | 获取当前实例的 Type。(继承自 Object) | 
| MemberwiseClone() | 创建当前 Object 的浅表副本。(继承自 Object) | 
| OnCreateDynamicUpdateMap(UpdateMapMetadata, Activity) | 创建动态更新映射时引发事件。(继承自 Activity) | 
| ShouldSerializeDisplayName() | 指示是否应序列化 DisplayName 属性。(继承自 Activity) | 
| ToString() | 返回包含 String 的 Id 和 DisplayName 的 Activity。(继承自 Activity) | 
显式接口实现
| ICustomTypeDescriptor.GetAttributes() | 返回动态活动的特性集合。 | 
| ICustomTypeDescriptor.GetClassName() | 返回动态活动的类名称。 | 
| ICustomTypeDescriptor.GetComponentName() | 返回动态活动的组件名称。 | 
| ICustomTypeDescriptor.GetConverter() | 返回动态活动的类型转换器。 | 
| ICustomTypeDescriptor.GetDefaultEvent() | 返回动态活动的默认事件。 | 
| ICustomTypeDescriptor.GetDefaultProperty() | 返回动态活动的默认属性。 | 
| ICustomTypeDescriptor.GetEditor(Type) | 使用指定的基类型返回编辑器。 | 
| ICustomTypeDescriptor.GetEvents() | 返回动态活动的事件集合。 | 
| ICustomTypeDescriptor.GetEvents(Attribute[]) | 通过将指定的特性数组用作筛选器来返回动态活动的事件的集合。 | 
| ICustomTypeDescriptor.GetProperties() | 返回动态活动的属性集合。 | 
| ICustomTypeDescriptor.GetProperties(Attribute[]) | 通过将指定的特性数组用作筛选器来返回动态活动的属性的集合。 | 
| ICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor) | 返回 DynamicActivity<TResult> 类的此实例。 |