/// <summary> /// Defines a variable. /// </summary> /// <param name="conditionedDefinition">Conditioned definition</param> /// <param name="name">Variable name</param> /// <param name="value">Variable value</param> public static Conditioned <VariableBase> Variable( this Conditioned <VariableBase> conditionedDefinition, string name, int value) { conditionedDefinition.Definitions.Add(new Conditioned <VariableBase>(definition: new Variable(name, value))); return(conditionedDefinition); }
/// <summary> /// Defines multiple variables at once. /// </summary> /// <param name="conditionedDefinition">Conditioned definition</param> /// <param name="variables">List of (key, value) pairs</param> public static Conditioned <VariableBase> Variables( this Conditioned <VariableBase> conditionedDefinition, params (string name, object value)[] variables)
/// <summary> /// Defines a variable. /// </summary> /// <param name="condition">Conditioned definition</param> /// <param name="name">Variable name</param> /// <param name="value">Variable value</param> public static Conditioned <VariableBase> Variable(this Condition condition, string name, int value) => Conditioned.Link <VariableBase>(condition, new Variable(name, value));