Example #1
0
        public virtual void ForEach <TSource>(IObservable <TSource> source, Action <TSource> onNext)
        {
            using var sink = new ForEach <TSource> .Observer(onNext);

            using (source.SubscribeSafe(sink))
            {
                sink.Wait();
            }

            sink.Error?.Throw();
        }