Ejemplo n.º 1
0
 public BinaryExpressionFilter(string left, string op, string right)
 {
     LeftExpression    = left;
     RightExpression   = right;
     MyLeftExpression  = Expression.Property(MyParameterExpression, left);
     MyRightExpression = BinaryOperatorFactory.CreateConstantExpression(MyLeftExpression, right);
     TryChangingOperator(op, MyRightExpression);
 }
Ejemplo n.º 2
0
 public bool TryChangingRightExpression(string right)
 {
     try
     {
         var exp = BinaryOperatorFactory.CreateConstantExpression(MyLeftExpression, right);
         if (TryChangingOperator(Operator, exp))
         {
             MyRightExpression = exp;
             RightExpression   = right;
             // have to reset the expressionfunc
             SetExpressionFunc();
             return(true);
         }
         return(false);
     }
     catch (Exception)
     {
         return(false);
     }
 }