Ejemplo n.º 1
0
        public void RaiseEvent(Type eventType, object o)
        {
            if (!eventMappers.ContainsKey(eventType))
            {
                return;
            }

            List <Type> existingProcessorTypes = eventMappers[eventType];

            foreach (Type t in existingProcessorTypes)
            {
                BaseEventProcessor processor = (BaseEventProcessor)Activator.CreateInstance(t);
                processor.Process();
            }
        }
Ejemplo n.º 2
0
        public void RaiseEvent <TEvent>(object o) where TEvent : BaseEvent
        {
            if (!eventMappers.ContainsKey(typeof(TEvent)))
            {
                return;
            }

            List <Type> existingProcessorTypes = eventMappers[typeof(TEvent)];

            foreach (Type t in existingProcessorTypes)
            {
                BaseEventProcessor processor = (BaseEventProcessor)Activator.CreateInstance(t);
                processor.Process();
            }
        }