private static void Main(string[] args)
        {
            Chef chef = new Chef();
            Command bl1 = new BakeLampCommand(chef);
            Command bl2 = new BakeLampCommand(chef);
            Command bcw1 = new BakeChickenWingCommand(chef);
            Waiter waiter = new Waiter();

            waiter.SetOrder(bl1);
            waiter.SetOrder(bl2);

            waiter.SetOrder(bcw1);
            waiter.CancelOrder(bl2);

            waiter.Notify();

            Console.ReadLine();
        }
Beispiel #2
0
        private static void Main(string[] args)
        {
            Chef    chef   = new Chef();
            Command bl1    = new BakeLampCommand(chef);
            Command bl2    = new BakeLampCommand(chef);
            Command bcw1   = new BakeChickenWingCommand(chef);
            Waiter  waiter = new Waiter();

            waiter.SetOrder(bl1);
            waiter.SetOrder(bl2);

            waiter.SetOrder(bcw1);
            waiter.CancelOrder(bl2);

            waiter.Notify();

            Console.ReadLine();
        }