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.");
 }
Exemple #3
0
 private object Evaluate(LogicalExpression expression)
 {
     expression.Accept(this);
     return(Result);
 }
Exemple #4
0
 public BinaryExpression EqualsTo(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Equal, this, operand));
 }
Exemple #5
0
 public BinaryExpression GreaterOrEqualThan(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.GreaterOrEqual, this, operand));
 }
Exemple #6
0
 public BinaryExpression And(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.And, this, operand));
 }
Exemple #7
0
 public BinaryExpression DividedBy(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Div, this, operand));
 }
Exemple #8
0
 public BinaryExpression BitwiseXOr(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.BitwiseXOr, this, operand));
 }
Exemple #9
0
 public BinaryExpression RightShift(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.RightShift, this, operand));
 }
Exemple #10
0
 public BinaryExpression Mult(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Times, this, operand));
 }
Exemple #11
0
 public BinaryExpression Plus(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Plus, this, operand));
 }
Exemple #12
0
 public BinaryExpression NotEqual(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.NotEqual, this, operand));
 }
Exemple #13
0
 public BinaryExpression Modulo(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Modulo, this, operand));
 }
Exemple #14
0
 public BinaryExpression LesserThan(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Lesser, this, operand));
 }