Esempio n. 1
0
        static void Main(string[] args)
        {
            var observable   = new MyRangeObservable(5, 8);
            var subscription = observable.Subscribe();

            Console.WriteLine("Press any key to exit the program...");
            Console.ReadKey();
        }
Esempio n. 2
0
        static void Demo()
        {
            var observable   = new MyRangeObservable(5, 8);
            var observer     = new MyObserver <int>();
            var subscription = observable.Subscribe(observer);

            Console.WriteLine("Press any key to dispose the subscription");
            Console.ReadKey();
            subscription.Dispose();
        }