namespace AsterNET.Manager.Action { /// /// The SetVar action sets the value of a channel variable for a given channel. /// public class SetVarAction : ManagerAction { /// The channel on which to set the variable. public string channel; /// The name of the variable to set. public string varName; /// The value to store. public string varValue; /// /// Creates a new empty SetVarAction. /// public SetVarAction() { } /// /// Creates a new SetVarAction that sets the given global variable to a new value. /// /// the name of the global variable to set /// the new value public SetVarAction(string variable, string value) { varName = variable; varValue = value; } /// /// Creates a new SetVarAction that sets the given channel variable of the /// given channel to a new value. /// /// the name of the channel to set the variable on /// the name of the channel variable /// the new value public SetVarAction(string channel, string variable, string value) { this.channel = channel; varName = variable; varValue = value; } /// /// Get the name of this action, i.e. "SetVar". /// public override string Action { get { return "SetVar"; } } /// /// Get/Set the name of the channel. /// public string Channel { get { return channel; } set { channel = value; } } /// /// Get/Set the name of the variable to set. /// public string Variable { get { return varName; } set { varName = value; } } /// /// Get/Set the value to store. /// public string Value { get { return varValue; } set { varValue = value; } } } }