public static IAsyncObservable <bool> Any <TSource>(this IAsyncObservable <TSource> source) { if (source == null) { throw new ArgumentNullException(nameof(source)); } return(Create <bool>(observer => source.SubscribeSafeAsync(AsyncObserver.Any <TSource>(observer)))); }
public static IAsyncObservable <bool> Any <TSource>(this IAsyncObservable <TSource> source, Func <TSource, ValueTask <bool> > predicate) { if (source == null) { throw new ArgumentNullException(nameof(source)); } if (predicate == null) { throw new ArgumentNullException(nameof(predicate)); } return(Create <bool>(observer => source.SubscribeSafeAsync(AsyncObserver.Any(observer, predicate)))); }