public Condition(SerializationInfo info, StreamingContext context) : base(info, context) { conditional = info.GetValue <Conditional>("conditional"); }
/// <summary> /// Creates a new condition node. /// </summary> /// <param name="conditional"> /// The conditional to evaluate. /// </param> public Condition(Conditional conditional) { this.conditional = conditional; }
/// <summary> /// Creates a new if block with a chained elif statement. /// </summary> /// <param name="expression">The expression to evaluate.</param> /// <param name="children">The children of the if.</param> /// <param name="elif">The chained if statement.</param> public If(Expression expression, IEnumerable <Node> children, Elif elif) : base(expression, children) { this.elif = elif; }
/// <summary> /// Creates a new if block with a chained else statement. /// </summary> /// <param name="expression">The expression to evaluate.</param> /// <param name="children">The children of the if.</param> /// <param name="else">The chained else statement.</param> public If(Expression expression, IEnumerable <Node> children, Else @else) : base(expression, children) { this.elif = @else; }
/// <summary> /// Creates a new if block. /// </summary> /// <param name="expression">The expression to evaluate.</param> /// <param name="children">The children of the if.</param> public If(Expression expression, IEnumerable <Node> children) : base(expression, children) { this.elif = null; }