public static bool All <TSource>(this IReadOnlyList <TSource> source, Func <TSource, bool> predicate) { switch (source) { case TSource[] array: return(ArrayExtensions.All <TSource>(array, predicate)); default: return(ReadOnlyList.All <IReadOnlyList <TSource>, IEnumerator <TSource>, TSource>(source, predicate)); } }
public static bool All <TSource>(this ImmutableList <TSource> source, PredicateAt <TSource> predicate) => ReadOnlyList.All <ImmutableList <TSource>, TSource>(source, predicate);
public static bool All <TSource>(this List <TSource> source, Predicate <TSource> predicate) => ReadOnlyList.All <List <TSource>, TSource>(source, predicate);