RemoteVariableSynchronizer.Add(variables)
Depending on the overload, adds a variable or a list of variables to the
RemoteVariableSynchronizer
object on which it is invoked.void public void Add(IUAVariablevariables); void public void Add(RemoteVariablevariables); void public void Add(IEnumerable<IUAVariable>variables); void public void Add(IEnumerable<RemoteVariable>variables);
Argument
- variables(IUAVariable)
- TheIUAVariableC# object to add to the object on which the method is invoked.
- variables(RemoteVariable)
- TheRemoteVariableC# object that identifies a cell of a one-dimensional or multidimensional array to be added to the object on which the method is invoked.
- variables(IEnumerable<IUAVariable>)
- TheIUAVariablelist to be added to the object on which the method is invoked.
- variables(IEnumerable<RemoteVariable>)
- TheRemoteVariablelist to be added to the object on which the method is invoked.
Examples
In the following example, a variable
speed
is added to the variableSynchronizer
object.
var speed = LogicObject.Owner.GetVariable("Speed"); var variableSynchronizer = new RemoteVariableSynchronizer(); variableSynchronizer.Add(speed);
In the following example, the index variable
10
is added to the variableSynchronizer
object within the arrayVariable
array.
var arrayVariable = LogicObject.Owner.GetVariable("ArrayVariable"); var variableSynchronizer = new RemoteVariableSynchronizer(); variableSynchronizer.Add(new RemoteVariable(arrayVariable, 10));
In the following example, the index variable
10.5
is added to the variableSynchronizer
object within the scalarVariable
multidimensional array.
var scalarVariable = LogicObject.Owner.GetVariable("ScalarVariable"); var variableSynchronizer = new RemoteVariableSynchronizer(); variableSynchronizer.Add(new RemoteVariable(scalarVariable, new uint[] { 10,5 }));
Provide Feedback