ActivityMetadata.AddVariable Method

Definition

Adds the specified variable to the metadata's collection of variables.

Overloads

AddVariable(Variable)

Adds the specified variable to the metadata's collection of variables.

AddVariable(Variable, Object)

Adds the specified variable to the metadata's collection of variables.

AddVariable(Variable)

Adds the specified variable to the metadata's collection of variables.

public:
 void AddVariable(System::Activities::Variable ^ variable);
public void AddVariable (System.Activities.Variable variable);
member this.AddVariable : System.Activities.Variable -> unit
Public Sub AddVariable (variable As Variable)

Parameters

variable
Variable

The variable to add.

Remarks

Variables added using this method are considered part of the activity's publicly configurable surface, that is, they are to be provided by the consumer of the activity. For example, Sequence adds the variables in its Variables collection using this method. An activity's implementation cannot access variables added using this method. Activities added through AddImportedChild (and any of their non-implementation child activities) can access variables added using this method. For example, Sequence adds its Activities collection in this manner.

Applies to

AddVariable(Variable, Object)

Adds the specified variable to the metadata's collection of variables.

public:
 void AddVariable(System::Activities::Variable ^ variable, System::Object ^ origin);
public void AddVariable (System.Activities.Variable variable, object origin);
member this.AddVariable : System.Activities.Variable * obj -> unit
Public Sub AddVariable (variable As Variable, origin As Object)

Parameters

variable
Variable

The variable to add.

origin
Object

The origin.

Applies to