2 using System
.Collections
.Generic
;
4 namespace IEnumerableExtras
7 /// Provides <see cref="IEnumerable{T}"/> Some/All extension.
9 public static class EnumerableAll
12 /// Check if all of this collection items satisfy <paramref name="testFunc"/>.
14 /// <typeparam name="T"></typeparam>
15 /// <param name="collection"></param>
16 /// <param name="testFunc"></param>
17 /// <returns></returns>
18 public static bool All
< T
>( this IEnumerable
<T
> collection
, Func
<T
, bool> testFunc
)
20 foreach ( T enumerable
in collection
)
22 if ( !testFunc( enumerable
) )