Пример #1
0
 public static Task <bool> ContainsAsync <T>(this IEnumerableAsync <T> enumerable, Func <T, bool> isMatchFunc)
 {
     return(enumerable.FirstMatchAsync(
                (item, match, next) =>
     {
         if (isMatchFunc(item))
         {
             return match(true);
         }
         return next();
     },
                () => false));
 }