public static bool Any <TSource>(this IReadOnlyList <TSource> source, Func <TSource, bool> predicate)
        {
            switch (source)
            {
            case TSource[] array:
                return(ArrayExtensions.Any <TSource>(array, predicate));

            default:
                return(ReadOnlyList.Any <IReadOnlyList <TSource>, IEnumerator <TSource>, TSource>(source, predicate));
            }
        }
Esempio n. 2
0
 public static bool Any <TSource>(this ImmutableList <TSource> source, PredicateAt <TSource> predicate)
 => ReadOnlyList.Any <ImmutableList <TSource>, TSource>(source, predicate);
 public static bool Any <TSource>(this List <TSource> source, Predicate <TSource> predicate)
 => ReadOnlyList.Any <List <TSource>, TSource>(source, predicate);