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); }
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); } }