예제 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="memberField"></param>
 /// <returns></returns>
 private static Expression IsNullOrEmpty(MemberExpression memberField)
 => memberField.HasOperator("IsNullOrEmpty")
         ? Expression.Call(typeof(string), nameof(string.IsNullOrEmpty), null, memberField)
         : null;
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="memberField"></param>
 /// <param name="constant"></param>
 /// <returns></returns>
 private static Expression EndsWith(MemberExpression memberField, Expression constant)
 => memberField.HasOperator("EndsWith")
         ? Expression.Call(memberField, memberField.GetOperator("EndsWith"), Expression.Convert(constant, memberField.Type))
         : null;
예제 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="memberField"></param>
 /// <param name="constant"></param>
 /// <returns></returns>
 private static Expression Like(MemberExpression memberField, Expression constant)
 => memberField.HasOperator("Contains")
         ? Expression.Call(memberField, memberField.GetOperator("Contains"), Expression.Convert(constant, memberField.Type))
         : Equals(memberField, constant);
예제 #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="memberField"></param>
 /// <param name="constant"></param>
 /// <returns></returns>
 private static Expression DoesNotStartWith(MemberExpression memberField, Expression constant)
 => memberField.HasOperator("StartsWith")
         ? Expression.Not(Expression.Call(memberField, memberField.GetOperator("StartsWith"), Expression.Convert(constant, memberField.Type)))
         : null;
예제 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="memberField"></param>
 /// <param name="constant"></param>
 /// <returns></returns>
 private static Expression DoesNotContain(MemberExpression memberField, Expression constant)
 => memberField.HasOperator("Contains")
         ? Expression.Not(Expression.Call(memberField, memberField.GetOperator("Contains"), Expression.Convert(constant, memberField.Type)))
         : null;