예제 #1
0
        public static T SendEvent <T>(this object context, T evt, int channel = EventManager.DefaultChannel)
            where T : Event, new()
        {
            if (evt == null)
            {
                using (var voidEvt = VoidEvent.Get())
                    EventManager.SendEvent(voidEvt, context, channel);
                return(null);
            }

            return(EventManager.SendEvent(evt, context, channel));
        }