Exemplo n.º 1
0
        public static void Main_ReplaySubjectOverview(string[] args)
        {
            var time           = TimeSpan.FromMilliseconds(500f);
            var marketTimespan = new ReplaySubject <float>(time);

            marketTimespan.OnNext(123);
            Thread.Sleep(200);
            marketTimespan.OnNext(234);
            Thread.Sleep(200);
            marketTimespan.OnNext(456);
            Thread.Sleep(200);
            marketTimespan.Inspect("marketTimespan");

            var bufferSize   = 3;
            var marketbuffer = new ReplaySubject <float>(bufferSize);

            marketbuffer.OnNext(1, 3, 4, 4, 5, 6, 7);
            marketbuffer.Inspect("market buffer");
        }