Activity 类

定义

用于从预先存在的 Activity 对象创建复合活动的抽象基类。An abstract base class used to create composite activities from pre-existing Activity objects.

public ref class Activity abstract
[System.Windows.Markup.ContentProperty("Implementation")]
public abstract class Activity
type Activity = class
Public MustInherit Class Activity
继承
Activity
派生
属性

示例

下面的示例演示 Activity 派生类的简单实现。The following example shows a simple implementation of an Activity derived class.

注解

Activity 是活动类型层次结构中的基类。Activity is the base class in the activity type hierarchy. 所有其他活动类型(例如 CodeActivityNativeActivityAsyncCodeActivityDynamicActivityActivityWithResult)均是从此类派生的。All other activity types such as CodeActivity, NativeActivity, AsyncCodeActivity, DynamicActivity, and ActivityWithResult derive from this class.

构造函数

Activity()

初始化 Activity 类的新实例。Initializes a new instance of the Activity class.

属性

CacheId

获取缓存的标识符,该标识符在工作流定义的作用域内是唯一的。Gets the identifier of the cache that is unique within the scope of the workflow definition.

Constraints

获取可配置的 Constraint 活动的集合,用于为 Activity 提供验证。Gets a collection of Constraint activities that can be configured to provide validation for the Activity.

DisplayName

获取或设置用于调试、验证、异常处理和跟踪的可选友好名称。Gets or sets an optional friendly name that is used for debugging, validation, exception handling, and tracking.

Id

获取一个标识符,该标识符在工作流定义的作用域内是唯一的。Gets an identifier that is unique in the scope of the workflow definition.

Implementation

获取或设置返回包含执行逻辑的 Activity 的委托。Gets or sets the delegate that returns an Activity that contains the execution logic.

ImplementationVersion

获取或设置用于实现的版本。Gets or sets the version of the implementation used.

方法

CacheMetadata(ActivityMetadata)

创建并验证活动的自变量、变量、子活动和活动委托的说明。Creates and validates a description of the activity's arguments, variables, child activities, and activity delegates.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnCreateDynamicUpdateMap(UpdateMapMetadata, Activity)

创建动态更新映射时引发事件。Raises an event when creating dynamic update map.

ShouldSerializeDisplayName()

指示是否应序列化 DisplayName 属性。Indicates whether the DisplayName property should be serialized.

ToString()

返回包含 StringIdDisplayNameActivityReturns a String that contains the Id and DisplayName of the Activity.

适用于