Пример #1
0
 private static void ClassicObserver()
 {
     var observerA = new ObserverPattern.Classic.ObserverA();
     var observerB = new ObserverPattern.Classic.ObserverB();
     var clock = new ObserverPattern.Classic.Clock();
     clock.Add(observerA);
     clock.Add(observerB);
     clock.Run("Bomb!", 2);
 }
Пример #2
0
        private static void ClassicObserver()
        {
            var observerA = new ObserverPattern.Classic.ObserverA();
            var observerB = new ObserverPattern.Classic.ObserverB();
            var clock     = new ObserverPattern.Classic.Clock();

            clock.Add(observerA);
            clock.Add(observerB);
            clock.Run("Bomb!", 2);
        }