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 ICustomTypeDescriptor
Public NotInheritable Class DynamicActivity(Of TResult)
Inherits Activity(Of TResult)
Implements ICustomTypeDescriptor
类型参数
- TResult
活动返回的结果。
- 继承
- 属性
- 实现
注解
使用 DynamicActivity<TResult> 可以创建新活动,而无需创建新类型。 DynamicActivity<TResult> 具有关联的 XAML 支持, ActivityXamlServices 允许在 XAML 中定义新参数,并由主机绑定,而无需编译 XAML。
构造函数
| 名称 | 说明 |
|---|---|
| DynamicActivity<TResult>() |
创建类的新实例 DynamicActivity<TResult> 。 |
属性
| 名称 | 说明 |
|---|---|
| Attributes |
获取动态生成的活动的属性的集合。 |
| CacheId |
获取在工作流定义范围内唯一的缓存的标识符。 (继承自 Activity) |
| Constraints |
返回配置为为 提供验证的活动Constraint集合DynamicActivity<TResult>。 |
| DisplayName |
获取或设置用于调试、验证、异常处理和跟踪的可选友好名称。 (继承自 Activity) |
| Id |
获取工作流定义范围中唯一的标识符。 (继承自 Activity) |
| Implementation |
获取或设置活动的执行逻辑。 |
| ImplementationVersion |
获取或设置活动的实现版本。 |
| 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> 此实例。 |