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