Example #1
0
 public void AddEventSubscriber(Type eventType, MethodInfo methodInfo)
 {
     if (!EventsHandlers.ContainsKey(eventType))
     {
         EventsHandlers[eventType] = new EventHandler(eventType);
     }
     EventsHandlers[eventType].AddSubscriber(methodInfo.DeclaringType, methodInfo);
 }
Example #2
0
 public bool HasAnySubscribers <T>()
 {
     return(EventsHandlers.ContainsKey(typeof(T)));
 }