Beispiel #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(") ");
            }
        }
Beispiel #2
0
 public BinaryExpression NotEqual(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.NotEqual, this, operand));
 }
Beispiel #3
0
 public BinaryExpression Modulo(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Modulo, this, operand));
 }
Beispiel #4
0
 public BinaryExpression Minus(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Minus, this, operand));
 }
Beispiel #5
0
 public BinaryExpression And(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.And, this, operand));
 }
Beispiel #6
0
 public BinaryExpression LesserOrEqualThan(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.LesserOrEqual, this, operand));
 }
Beispiel #7
0
 public BinaryExpression GreaterThan(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Greater, this, operand));
 }
Beispiel #8
0
 public BinaryExpression EqualsTo(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Equal, this, operand));
 }
Beispiel #9
0
 public BinaryExpression RightShift(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.RightShift, this, operand));
 }
Beispiel #10
0
 public BinaryExpression DividedBy(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Div, this, operand));
 }
Beispiel #11
0
 public BinaryExpression BitwiseXOr(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.BitwiseXOr, this, operand));
 }
Beispiel #12
0
 public BinaryExpression Mult(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Times, this, operand));
 }
 private object Evaluate(LogicalExpression expression)
 {
     expression.Accept(this);
     return(Result);
 }