コード例 #1
0
        protected virtual void OnRaiseCustomEvent(ChairEventBusMessage e)
        {
            EventHandler <ChairEventBusMessage> handler = RaiseChairEvent;

            // Event will be null if there are no subscribers
            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
 // Define what actions to take when the event is raised.
 void HandleCustomEvent(object sender, ChairEventBusMessage e)
 {
     worker.operateBus(e.Message, e.Chair);
 }