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(IUAVariable variables);
void public void Add(RemoteVariable variables);
void public void Add(IEnumerable<IUAVariable> variables);
void public void Add(IEnumerable<RemoteVariable> variables);
Argument
variables
(IUAVariable)- The
IUAVariable
C# object to add to the object on which the method is invoked. variables
(RemoteVariable)- The
RemoteVariable
C# 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>)- The
IUAVariable
list to be added to the object on which the method is invoked. -
variables
(IEnumerable<RemoteVariable>) - The
RemoteVariable
list 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 }));