Exemplo 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 paren
                while (Result[Result.Length - 1] == ' ')
                {
                    Result.Remove(Result.Length - 1, 1);
                }

                Result.Append(") ");
            }
        }
Exemplo n.º 2
0
 public override void Visit(LogicalExpression expression)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 3
0
 private object Evaluate(LogicalExpression expression)
 {
     expression.Accept(this);
     return(Result);
 }
Exemplo n.º 4
0
 public BinaryExpression EqualsTo(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Equal, this, operand));
 }
Exemplo n.º 5
0
 public BinaryExpression GreaterOrEqualThan(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.GreaterOrEqual, this, operand));
 }
Exemplo n.º 6
0
 public BinaryExpression And(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.And, this, operand));
 }
Exemplo n.º 7
0
 public BinaryExpression DividedBy(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Div, this, operand));
 }
Exemplo n.º 8
0
 public BinaryExpression BitwiseXOr(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.BitwiseXOr, this, operand));
 }
Exemplo n.º 9
0
 public BinaryExpression RightShift(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.RightShift, this, operand));
 }
Exemplo n.º 10
0
 public BinaryExpression Mult(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Times, this, operand));
 }
Exemplo n.º 11
0
 public BinaryExpression Plus(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Plus, this, operand));
 }
Exemplo n.º 12
0
 public BinaryExpression NotEqual(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.NotEqual, this, operand));
 }
Exemplo n.º 13
0
 public BinaryExpression Modulo(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Modulo, this, operand));
 }
Exemplo n.º 14
0
 public BinaryExpression LesserThan(LogicalExpression operand)
 {
     return(new BinaryExpression(BinaryExpressionType.Lesser, this, operand));
 }