예제 #1
0
파일: Map.cs 프로젝트: rmstreet/Predicates
        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
파일: Map.cs 프로젝트: rmstreet/Predicates
 public Map(string propertyPath, PredicateBase <T> then)
 {
     Then         = then;
     PropertyPath = propertyPath;
 }