public void NotifySubscribers(ObserverContextType type)
 {
     foreach (var subscriber in subsribers)
     {
         subscriber.Notify(type);
     }
 }
        public void Notify(ObserverContextType type)
        {
            if (type != ObserverContextType.IncomeProduct)
            {
                return;
            }

            Console.WriteLine("Shop: income new products.");
        }
Example #3
0
        public void Notify(ObserverContextType type)
        {
            if (type != ObserverContextType.SellProduct)
            {
                return;
            }

            Console.WriteLine("Shop: was made a sell.");
        }