InArgument<T> Class

Definition

表示数据流入活动的绑定终端。A binding terminal that represents the flow of data into an activity.

generic <typename T>
public ref class InArgument sealed : System::Activities::InArgument
[System.ComponentModel.TypeConverter(typeof(System.Activities.XamlIntegration.InArgumentConverter))]
[System.Windows.Markup.ContentProperty("Expression")]
public sealed class InArgument<T> : System.Activities.InArgument
type InArgument<'T> = class
    inherit InArgument
Public NotInheritable Class InArgument(Of T)
Inherits InArgument

Type Parameters

T

InArgument<T> 的数据类型。The data type of the InArgument<T>.

Inheritance
InArgument<T>
Attributes

Examples

在此示例中,创建的工作流包含一个 WriteLine 活动。In this example, a workflow is created that consists of a single WriteLine activity. WriteLine 活动有一个名为 InArgument<T>TextThe WriteLine activity has an InArgument<T> named Text. 主机应用程序会创建一个工作流实例并传递一个字符串,该字符串会映射到 TextWriteLine 参数,并由 WriteLine 活动使用。The host application creates an instance of the workflow and passes a string, which maps to the Text argument of the WriteLine and is used by the WriteLine activity.

Activity wf = new WriteLine();  
  
Dictionary<string, object> wfParams = new Dictionary<string, object>();  
wfParams.Add("Text", "Hello World!");  
  
WorkflowInvoker.Invoke(wf, wfParams);  
  

Constructors

InArgument<T>()

使用默认值初始化 InArgument<T> 类的新实例。Initializes a new instance of the InArgument<T> class using default values.

InArgument<T>(Activity<T>)

使用指定的 InArgument<T> 初始化 Activity<TResult> 类的新实例。Initializes a new instance of the InArgument<T> class using the specified Activity<TResult>.

InArgument<T>(DelegateArgument)

使用指定的 InArgument<T> 初始化 DelegateArgument 类的新实例。Initializes a new instance of the InArgument<T> class using the specified DelegateArgument.

InArgument<T>(Expression<Func<ActivityContext,T>>)

使用指定的表达式初始化 InArgument<T> 类的新实例。Initializes a new instance of the InArgument<T> class using the specified expression.

InArgument<T>(T)

使用指定的值初始化 InArgument<T> 类的新实例。Initializes a new instance of the InArgument<T> class using the specified value.

InArgument<T>(Variable)

使用指定的 InArgument<T> 初始化 Variable 类的新实例。Initializes a new instance of the InArgument<T> class using the specified Variable.

Fields

ResultValue

表示“Result”的常量值,该值对应于表达式基类 Result 中类型为 OutArgumentActivityWithResult 属性的名称。Represents the constant value of "Result", which corresponds to the name of the Result property of type OutArgument in the expression base class ActivityWithResult.

(Inherited from Argument)

Properties

ArgumentType

获取数据绑定到此 Argument 的数据类型。Gets the data type for the data bound to this Argument.

(Inherited from Argument)
Direction

获取 ArgumentDirection,该值指定 Argument 是表示数据流入活动、流出活动还是流入和流出活动。Gets an ArgumentDirection that specifies whether the Argument represents the flow of data into an activity, out of an activity, or both into and out of an activity.

(Inherited from Argument)
EvaluationOrder

获取或设置一个从零开始的值,该值指定自变量的计算顺序。Gets or sets a zero-based value that specifies the order in which the argument is evaluated.

(Inherited from Argument)
Expression

获取一个表示此 Activity<TResult> 的值的 InArgument<T>Gets an Activity<TResult> that represents the value of this InArgument<T>.

Methods

Equals(Object)

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

(Inherited from Object)
FromDelegateArgument(DelegateArgument)

使用指定的 InArgument<T> 初始化并返回一个新的 DelegateArgumentInitializes and returns a new InArgument<T> using the specified DelegateArgument.

FromExpression(Activity<T>)

使用指定的 InArgument<T> 初始化并返回一个新的 Activity<TResult>Initializes and returns a new InArgument<T> using the specified Activity<TResult>.

FromValue(T)

使用指定值初始化并返回一个新的 InArgument<T>Initializes and returns a new InArgument<T> using the specified value.

FromVariable(Variable)

使用指定的 InArgument<T> 初始化并返回一个新的 VariableInitializes and returns a new InArgument<T> using the specified Variable.

Get(ActivityContext)

使用指定的活动上下文获取 InArgument<T> 的值。Gets the value of the InArgument<T> using the specified activity context.

Get<T>(ActivityContext)

使用指定类型和活动上下文获取自变量的值。Gets the value of the argument using the specified type and activity context.

(Inherited from Argument)
GetHashCode()

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

(Inherited from Object)
GetLocation(ActivityContext)

获取此 LocationArgumentGets the Location for this Argument.

(Inherited from Argument)
GetType()

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

(Inherited from Object)
MemberwiseClone()

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

(Inherited from Object)
Set(ActivityContext, Object)

使用指定活动上下文设置参数的值。Sets the value of the argument using the specified activity context.

(Inherited from Argument)
Set(ActivityContext, T)

使用指定值设置 InArgument<T> 的值。Sets the value of the InArgument<T> using the specified value.

ToString()

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

(Inherited from Object)

Operators

Implicit(Activity<T> to InArgument<T>)

使用指定的 InArgument<T> 初始化并返回一个新的 Activity<TResult>Initializes and returns a new InArgument<T> using the specified Activity<TResult>.

Implicit(DelegateArgument to InArgument<T>)

使用指定的 InArgument<T> 初始化并返回一个新的 DelegateArgumentInitializes and returns a new InArgument<T> using the specified DelegateArgument.

Implicit(T to InArgument<T>)

使用指定值初始化并返回一个新的 InArgument<T>Initializes and returns a new InArgument<T> using the specified value.

Implicit(Variable to InArgument<T>)

使用指定的 InArgument<T> 初始化并返回一个新的 VariableInitializes and returns a new InArgument<T> using the specified Variable.

Applies to