Ejemplo n.º 1
0
        public void Run(EventIdType type)
        {
            List <object> iEvents;

            if (!this.allEvents.TryGetValue(type, out iEvents))
            {
                return;
            }
            foreach (object obj in iEvents)
            {
                try
                {
                    IEvent iEvent = (IEvent)obj;
                    iEvent.Run();
                }
                catch (Exception e)
                {
                    Log.Error(e.ToString());
                }
            }
        }
Ejemplo n.º 2
0
        public void Run <A, B, C>(EventIdType type, A a, B b, C c)
        {
            List <object> iEvents;

            if (!this.allEvents.TryGetValue(type, out iEvents))
            {
                return;
            }

            foreach (object obj in iEvents)
            {
                try
                {
                    IEvent <A, B, C> iEvent = (IEvent <A, B, C>)obj;
                    iEvent.Run(a, b, c);
                }
                catch (Exception err)
                {
                    Log.Error(err.ToString());
                }
            }
        }