Ejemplo n.º 1
0
        protected void EncapsulateNoValue(LogicalExpression expression)
        {
            if (expression is ValueExpression)
            {
                expression.Accept(this);
            }
            else
            {
                Result.Append("(");
                expression.Accept(this);

                // Trim spaces before adding a closing parenthesis
                while (Result[Result.Length - 1] == ' ')
                {
                    Result.Remove(Result.Length - 1, 1);
                }

                Result.Append(") ");
            }
        }
Ejemplo n.º 2
0
 public BinaryExpression NotEqual(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.NotEqual, this, operand));
 }
Ejemplo n.º 3
0
 public BinaryExpression Modulo(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Modulo, this, operand));
 }
Ejemplo n.º 4
0
 public BinaryExpression Minus(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Minus, this, operand));
 }
Ejemplo n.º 5
0
 public BinaryExpression And(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.And, this, operand));
 }
Ejemplo n.º 6
0
 public BinaryExpression LesserOrEqualThan(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.LesserOrEqual, this, operand));
 }
Ejemplo n.º 7
0
 public BinaryExpression GreaterThan(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Greater, this, operand));
 }
Ejemplo n.º 8
0
 public BinaryExpression EqualsTo(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Equal, this, operand));
 }
Ejemplo n.º 9
0
 public BinaryExpression RightShift(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.RightShift, this, operand));
 }
Ejemplo n.º 10
0
 public BinaryExpression DividedBy(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Div, this, operand));
 }
Ejemplo n.º 11
0
 public BinaryExpression BitwiseXOr(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.BitwiseXOr, this, operand));
 }
Ejemplo n.º 12
0
 public BinaryExpression Mult(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Times, this, operand));
 }
Ejemplo n.º 13
0
 private object Evaluate(LogicalExpression expression)
 {
     expression.Accept(this);
     return(Result);
 }