コード例 #1
0
ファイル: Program.cs プロジェクト: AlexeyM196/xt_net_web
        protected virtual void OnPizzaReadyToEat(ReadyPizzaEvent x)
        {
            EventHandler handler = PizzaReadyToEat;

            handler?.Invoke(this, x);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: AlexeyM196/xt_net_web
        static void c_PizzaIsReadyToEat(object sender, EventArgs x)
        {
            ReadyPizzaEvent rpe = (ReadyPizzaEvent)x;

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