示例#1
0
 public ChichenWinCommond(Barbecue receiver)
     : base(receiver)
 {
 }
示例#2
0
 public Shaokao(Barbecue receiver)
 {
     this.receiver = receiver;
 }
示例#3
0
 public SheepCommond(Barbecue receiver)
     : base(receiver)
 {
 }
示例#4
0
        static void Main(string[] args)
        {
            Barbecue cr = new Barbecue();
            Shaokao c1 = new ChichenWinCommond(cr);
            Shaokao c2 = new SheepCommond(cr);

            Waiter w = new Waiter();
            w.SetOrder(c1);
            w.SetOrder(c2);
            w.Notify();
        }