Handle Class

Definition

表示一种生存期由工作流运行时控制的类型。Represents a type that has its lifetime controlled by the workflow runtime.

public ref class Handle abstract
[System.Runtime.Serialization.DataContract]
public abstract class Handle
type Handle = class
Public MustInherit Class Handle
Inheritance
Handle
Derived
Attributes

Remarks

Handle 派生的类型的生存期由工作流运行时控制。Types derived from Handle have their lifetimes controlled by the workflow runtime. 对于句柄类型的工作流变量, 运行时使用所需的无参数构造函数创建类型的实例, 将其Variable分配给, OnInitialize并在初始化环境时调用。For workflow variables of handle types, the runtime uses the required parameterless constructor to create an instance of the type, assigns it to the Variable, and calls OnInitialize when initializing the environment. 当变量超出作用域时,将调用 OnUninitializeWhen the variable goes out of scope, OnUninitialize is called.

Constructors

Handle()

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

Properties

ExecutionPropertyName

获取在此 Handle 添加到活动的执行属性时要使用的名称。Gets the name to be used by this Handle when added to an activity's execution properties.

Owner

获取包含 ActivityInstance(其中包含 Variable)的 HandleGets the ActivityInstance that contains the Variable that contains the Handle.

Methods

Equals(Object)

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

(Inherited from Object)
GetHashCode()

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

(Inherited from Object)
GetType()

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

(Inherited from Object)
MemberwiseClone()

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

(Inherited from Object)
OnInitialize(HandleInitializationContext)

当初始化包含 Handle 的环境时,由工作流运行时调用。Called by the workflow runtime when the environment that contains the Handle is initialized.

OnUninitialize(HandleInitializationContext)

VariableHandle 超出作用域时,由工作流运行时调用。Called by the workflow runtime when the Variable for the Handle goes out of scope.

ThrowIfUninitialized()

如果尚未初始化 InvalidOperationException,则将引发 HandleThrows an InvalidOperationException if the Handle has not been initialized.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

Applies to