public static Net.Vpc.Upa.Expressions.BinaryOperatorExpression Create(Net.Vpc.Upa.Expressions.BinaryOperator @operator, Net.Vpc.Upa.Expressions.Expression left, Net.Vpc.Upa.Expressions.Expression right)
        {
            switch (@operator)
            {
            case Net.Vpc.Upa.Expressions.BinaryOperator.AND:
            {
                return(new Net.Vpc.Upa.Expressions.And(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.OR:
            {
                return(new Net.Vpc.Upa.Expressions.Or(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.BIT_AND:
            {
                return(new Net.Vpc.Upa.Expressions.BitAnd(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.BIT_OR:
            {
                return(new Net.Vpc.Upa.Expressions.BitOr(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.LSHIFT:
            {
                return(new Net.Vpc.Upa.Expressions.LShift(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.RSHIFT:
            {
                return(new Net.Vpc.Upa.Expressions.RShift(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.URSHIFT:
            {
                return(new Net.Vpc.Upa.Expressions.URShift(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.XOR:
            {
                return(new Net.Vpc.Upa.Expressions.XOr(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.DIFF:
            {
                return(new Net.Vpc.Upa.Expressions.Different(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.EQ:
            {
                return(new Net.Vpc.Upa.Expressions.Equals(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.GT:
            {
                return(new Net.Vpc.Upa.Expressions.GreaterThan(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.GE:
            {
                return(new Net.Vpc.Upa.Expressions.GreaterEqualThan(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.LT:
            {
                return(new Net.Vpc.Upa.Expressions.LessThan(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.LE:
            {
                return(new Net.Vpc.Upa.Expressions.LessEqualThan(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.PLUS:
            {
                return(new Net.Vpc.Upa.Expressions.Plus(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.MINUS:
            {
                return(new Net.Vpc.Upa.Expressions.Minus(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.MUL:
            {
                return(new Net.Vpc.Upa.Expressions.Mul(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.DIV:
            {
                return(new Net.Vpc.Upa.Expressions.Div(left, right));
            }

            case Net.Vpc.Upa.Expressions.BinaryOperator.LIKE:
            {
                return(new Net.Vpc.Upa.Expressions.Like(left, right));
            }

            default:
            {
                throw new System.ArgumentException("Not Supported Yet");
            }
            }
        }
示例#2
0
 public CompiledBinaryOperatorExpression(Net.Vpc.Upa.Expressions.BinaryOperator @operator, Net.Vpc.Upa.Impl.Uql.Compiledexpression.DefaultCompiledExpression left, object right)  : this(@operator, left, Net.Vpc.Upa.Impl.Uql.CompiledExpressionFactory.ToLiteral(right))
 {
 }