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();
        }
Exemple #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();
        }
 public BakeChickenWingCommand(Chef receiver)
     : base(receiver)
 {
 }
 public BakeLampCommand(Chef receiver)
     : base(receiver)
 {
 }
 public BakeLampCommand(Chef receiver)
     : base(receiver)
 {
 }
Exemple #6
0
 public BakeChickenWingCommand(Chef receiver)
     : base(receiver)
 {
 }
 public Command(Chef receiver)
 {
     _receiver = receiver;
 }
Exemple #8
0
 public Command(Chef receiver)
 {
     _receiver = receiver;
 }