protected void EncapsulateNoValue(LogicalExpression expression) { if (expression is ValueExpression) { expression.Accept(this); } else { Result.Append("("); expression.Accept(this); // trim spaces before adding a closing paren while (Result[Result.Length - 1] == ' ') { Result.Remove(Result.Length - 1, 1); } Result.Append(") "); } }
public override void Visit(LogicalExpression expression) { throw new Exception("The method or operation is not implemented."); }
private object Evaluate(LogicalExpression expression) { expression.Accept(this); return(Result); }
public BinaryExpression EqualsTo(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.Equal, this, operand)); }
public BinaryExpression GreaterOrEqualThan(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.GreaterOrEqual, this, operand)); }
public BinaryExpression And(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.And, this, operand)); }
public BinaryExpression DividedBy(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.Div, this, operand)); }
public BinaryExpression BitwiseXOr(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.BitwiseXOr, this, operand)); }
public BinaryExpression RightShift(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.RightShift, this, operand)); }
public BinaryExpression Mult(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.Times, this, operand)); }
public BinaryExpression Plus(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.Plus, this, operand)); }
public BinaryExpression NotEqual(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.NotEqual, this, operand)); }
public BinaryExpression Modulo(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.Modulo, this, operand)); }
public BinaryExpression LesserThan(LogicalExpression operand) { return(new BinaryExpression(BinaryExpressionType.Lesser, this, operand)); }