public void Distribute(int nMsgCode, params object[] rEventArgs) { EventArg rEventArg = new EventArg() { Args = new List <object>(rEventArgs) }; this.DistributeArg(nMsgCode, rEventArg); }
public void DistributeArg(int nMsgCode, EventArg rEventArg) { Event rEvent = null; if (this.mEvents.TryGetValue(nMsgCode, out rEvent)) { if (rEvent.Callbacks != null) { for (int i = 0; i < rEvent.Callbacks.Count; i++) { UtilTool.SafeExecute(rEvent.Callbacks[i], rEventArg); } } } }