示例#1
0
        private static void ObservableTest()
        {
            TempObservable source = new TempObservable();

            IObserver <float> observer = new ConsoleObserver();

            source.Subscribe(observer);
        }
示例#2
0
        public static void FundamentalTest()
        {
            ObservationSource source = new ObservationSource();

            ConsoleObserver observer = new ConsoleObserver("Marcin");

            source.Subscribe(observer);

            ConsoleObserver observer2 = new ConsoleObserver("Kasia");

            source.Subscribe(observer2);
        }
        private static void ObservableTest()
        {

            // Covid19Test();

            

            ConsoleObserver observer1 = new ConsoleObserver("Marcin");
            ConsoleObserver observer2 = new ConsoleObserver("Bartek");

            MessagesSource source = new MessagesSource();

            source.Subscribe(observer1);


            source.OnNext("Break coffee");

            source.Subscribe(observer2);

            source.OnNext("Lunch");
        }