Beispiel #1
0
 //专门触发事件的方法,定义为OnEvent();
 public void OnAction()
 {
     //必须判断这个委托是不是为空。
     if (this.actionEventHandler != null)
     {
         Console.WriteLine("++++++++++++++");
         ActioneEventArgs e = new ActioneEventArgs()
         {
             DishName = "Chicken"
         };
         this.actionEventHandler.Invoke(this, e);
     }
 }
Beispiel #2
0
 internal void Action(Customer customer, ActioneEventArgs e)
 {
     Console.WriteLine("---------------");
 }