Exemple #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;
        }
Exemple #2
0
 public PredicateBase <TB> Is(PredicateBase <T> predicate)
 {
     return(new Map <T, TB>(_source, predicate));
 }
Exemple #3
0
 public static PredicateBase <T> Or <T>(this PredicateBase <T> left, PredicateBase <T> right)
 {
     return(new Any <T>(left, right));
 }
Exemple #4
0
 public static PredicateBase <T> And <T>(this PredicateBase <T> left, PredicateBase <T> right)
 {
     return(new All <T>(left, right));
 }
Exemple #5
0
 public Map(string propertyPath, PredicateBase <T> then)
 {
     Then         = then;
     PropertyPath = propertyPath;
 }