示例#1
0
        public Map(Expression <Func <TB, T> > memberAccessExpression, PredicateBase <T> then)
        {
            Then         = then;
            PropertyPath = memberAccessExpression.ToPropertyPath();

            // TODO: Adapt for expression with more than one parameter.
            ParameterName = memberAccessExpression.Parameters.FirstOrDefault()?.Name;
        }
示例#2
0
 public PredicateBase <TB> Is(PredicateBase <T> predicate)
 {
     return(new Map <T, TB>(_source, predicate));
 }
示例#3
0
 public static PredicateBase <T> Or <T>(this PredicateBase <T> left, PredicateBase <T> right)
 {
     return(new Any <T>(left, right));
 }
示例#4
0
 public static PredicateBase <T> And <T>(this PredicateBase <T> left, PredicateBase <T> right)
 {
     return(new All <T>(left, right));
 }
示例#5
0
 public Map(string propertyPath, PredicateBase <T> then)
 {
     Then         = then;
     PropertyPath = propertyPath;
 }