public static IAsyncObservable <Double> Average(this IAsyncObservable <Int64> source) { if (source == null) { throw new ArgumentNullException(nameof(source)); } return(Create <Double>(observer => source.SubscribeSafeAsync(AsyncObserver.AverageInt64(observer)))); }
public static IAsyncObservable <Double> Average <TSource>(this IAsyncObservable <TSource> source, Func <TSource, Int64> selector) { if (source == null) { throw new ArgumentNullException(nameof(source)); } if (selector == null) { throw new ArgumentNullException(nameof(selector)); } return(Create <Double>(observer => source.SubscribeSafeAsync(AsyncObserver.AverageInt64(observer, selector)))); }