示例#1
0
        protected virtual void OnPizzaReadyToEat(ReadyPizzaEvent x)
        {
            EventHandler handler = PizzaReadyToEat;

            handler?.Invoke(this, x);
        }
示例#2
0
        static void c_PizzaIsReadyToEat(object sender, EventArgs x)
        {
            ReadyPizzaEvent rpe = (ReadyPizzaEvent)x;

            Console.WriteLine("Pizza is ready for: " + rpe.CompleteOrder.CustomerName);
        }