Ejemplo n.º 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)));
        }
Ejemplo n.º 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)));
        }
Ejemplo n.º 3
0
 public Expression GreaterThanOrEqual <T>(CompareInput input) => Expression.GreaterThanOrEqual(input.PropertyExpr, Expression.Convert(input.Value, input.PropertyExpr.Type));
Ejemplo n.º 4
0
 public Expression NotEqual <T>(CompareInput input) => Expression.NotEqual(input.PropertyExpr, Expression.Convert(input.Value, input.PropertyExpr.Type));
Ejemplo n.º 5
0
 public Expression Contains <T>(CompareInput input) => throw new Exception(ErrorConstants.OPERATION_NOT_ALLOWED);
Ejemplo n.º 6
0
 public Expression LessThan <T>(CompareInput input) => Expression.LessThan(input.PropertyExpr, Expression.Convert(input.Value, input.PropertyExpr.Type));