Esempio n. 1
0
        public static ReplaySubject <T> Broadcast <T> (Action <T> lambda)
        {
            var broadcast = new ReplaySubject <T>();

            broadcast.ForEachAsync(lambda);
            return(broadcast);
        }
Esempio n. 2
0
        public static void Broadcast <T>(IObservable <T> recievers, Action <T> lambda)
        {
            var broadcast = new ReplaySubject <T>();

            broadcast.ForEachAsync(lambda);
            recievers.Subscribe(cl => broadcast.OnNext(cl), () => broadcast.OnCompleted());
            broadcast.Dispose();
        }