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