Exemple #1
0
 public static Pred <T> AllTrue <T>(this IEnumerable <Pred <T> > predicates, bool shortCircuit = true)
 {
     if (predicates == null)
     {
         throw new ArgumentNullException(nameof(predicates));
     }
     return(Pred <T> .All(predicates.Select(p => p.Func), shortCircuit));
 }
Exemple #2
0
 public static Func <T, bool> AllTrue <T>(this IEnumerable <Func <T, bool> > predicates, bool shortCircuit = true)
 {
     if (predicates == null)
     {
         throw new ArgumentNullException(nameof(predicates));
     }
     return(Pred <T> .All(predicates, shortCircuit));
 }