ActivityFunc<T1,T2,TResult> Class

Definition

定义一个活动委托,它具有一个类型为 T 的 In 参数和一个类型为 TResultout 参数。Defines an activity delegate with one in argument of type T and one out argument of type TResult.

generic <typename T1, typename T2, typename TResult>
public ref class ActivityFunc sealed : System::Activities::ActivityDelegate
public sealed class ActivityFunc<T1,T2,TResult> : System.Activities.ActivityDelegate
type ActivityFunc<'T1, 'T2, 'Result> = class
    inherit ActivityDelegate
Public NotInheritable Class ActivityFunc(Of T1, T2, TResult)
Inherits ActivityDelegate

Type Parameters

T1

活动委托的第一个 In 自变量的类型。The type of the first in argument of the activity delegate.

T2

活动委托的第二个 In 自变量的类型。The type of the second in argument of the activity delegate.

TResult

活动委托的 Out 自变量的类型。The type of the out argument of the activity delegate.

Inheritance
ActivityFunc<T1,T2,TResult>

Remarks

ActivityDelegate 允许活动作者公开具有特定签名的回调,活动的用户可为这些回调提供基于活动的处理程序。The ActivityDelegate enables activity authors to expose callbacks with specific signatures that users of the activity can provide activity-based handlers for. ActivityFunc<T1,T2,TResult> 是具有返回值的 ActivityDelegateActivityFunc<T1,T2,TResult> is an ActivityDelegate that returns a value. ActivityFunc<T1,T2,TResult> 的签名作为泛型类型参数来指定。The signature of the ActivityFunc<T1,T2,TResult> is specified as generic type arguments.

此类型有多个泛型版本, 它在参数中采用1到16个, 加out上调用的活动的参数。There are multiple generic versions of this type that take from 1 to 16 in arguments, plus the out argument, for the activity that is called. 对于不返回值的活动委托, 还有ActivityAction类型。There are also ActivityAction types for activity delegates that do not return values.

Constructors

ActivityFunc<T1,T2,TResult>()

创建 ActivityFunc<T1,T2,TResult> 类的新实例。Creates a new instance of the ActivityFunc<T1,T2,TResult> class.

Properties

Argument1

获取或设置活动委托的第一个 In 自变量。Gets or sets the first in argument of the activity delegate.

Argument2

获取或设置活动委托的第二个 In 自变量。Gets or sets the second in argument of the activity delegate.

DisplayName

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

(Inherited from ActivityDelegate)
Handler

获取或设置由此 ActivityDelegate 表示的活动。Gets or sets the activity that is represented by this ActivityDelegate.

(Inherited from ActivityDelegate)
Result

获取或设置活动委托的 Out 参数。Gets or sets the out argument of the activity delegate.

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)
GetResultArgument()

在派生类中实现时,返回 DelegateOutArgumentActivityDelegateWhen implemented in a derived class, returns the DelegateOutArgument of the ActivityDelegate.

(Inherited from ActivityDelegate)
GetType()

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

(Inherited from Object)
MemberwiseClone()

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

(Inherited from Object)
OnGetRuntimeDelegateArguments(IList<RuntimeDelegateArgument>)

提供 ActivityDelegate 的运行时自变量列表。Supplies a list of runtime arguments for the ActivityDelegate.

(Inherited from ActivityDelegate)
ShouldSerializeDisplayName()

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

(Inherited from ActivityDelegate)
ToString()

返回包含 StringActivityDelegateDisplayName 表示形式。Returns a String representation of the ActivityDelegate that contains the DisplayName.

(Inherited from ActivityDelegate)

Applies to

See also