private static void HotSourceTest()
        {
            var source = new Subject <decimal>();

            MyObserver observer = new MyObserver("Marcin");

            source.Subscribe(observer);

            source.OnNext(100.05m);
            source.OnNext(98.45m);
            source.OnNext(89.05m);
            source.OnNext(106.75m);

            MyObserver observer2 = new MyObserver("Bartek");

            source.Subscribe(observer2);

            source.Subscribe(amount => Console.WriteLine($"[Anna] {amount}"));

            source.Subscribe(
                amount => Console.WriteLine($"[Piotr] {amount}"), // OnNext
                e => Console.WriteLine("[Piotr] ERROR"),          // OnError
                () => Console.WriteLine("[Piotr] EOT")            // OnCompleted
                );

            source.OnNext(104.88m);
            source.OnNext(103.93m);

            source.OnCompleted();

            source.OnNext(99.99m);
        }
        private static void ColdSourceTest()
        {
            MyColdSource source   = new MyColdSource();
            MyObserver   observer = new MyObserver("Marcin");

            using (var subsciption = source.Subscribe(observer))
            {
                // ...
            }
        }
        private static void ReplaySubjectTest()
        {
            var source = new ReplaySubject <decimal>();

            MyObserver observer = new MyObserver("Marcin");

            source.Subscribe(observer);

            source.OnNext(100.05m);
            source.OnNext(98.45m);
            source.OnNext(89.05m);
            source.OnNext(106.75m);

            MyObserver observer2 = new MyObserver("Bartek");

            source.Subscribe(observer2);

            source.OnNext(104.88m);
            source.OnNext(103.93m);

            source.OnCompleted();
        }