Example #1
0
        public Expression Contains <T>(CompareInput input)
        {
            var method      = typeof(string).GetMethod(nameof(string.Contains), new[] { typeof(string) });
            var contains__1 = Expression.Call(input.PropertyExpr, method, input.Value);

            return(Expression.Equal(contains__1, Expression.Constant(TrueValue)));
        }
Example #2
0
        public Expression Equal <T>(CompareInput input)
        {
            var compare = Expression.Call(typeof(string), nameof(string.Compare), null, input.PropertyExpr, input.Value);

            return(Expression.Equal(compare, Expression.Constant(_equalNumber)));
        }
Example #3
0
 public Expression GreaterThanOrEqual <T>(CompareInput input) => Expression.GreaterThanOrEqual(input.PropertyExpr, Expression.Convert(input.Value, input.PropertyExpr.Type));
Example #4
0
 public Expression NotEqual <T>(CompareInput input) => Expression.NotEqual(input.PropertyExpr, Expression.Convert(input.Value, input.PropertyExpr.Type));
Example #5
0
 public Expression Contains <T>(CompareInput input) => throw new Exception(ErrorConstants.OPERATION_NOT_ALLOWED);
Example #6
0
 public Expression LessThan <T>(CompareInput input) => Expression.LessThan(input.PropertyExpr, Expression.Convert(input.Value, input.PropertyExpr.Type));