private static void ExecuteHandlers(List <Action <EventArg> > evenHandlers, EventArg parameter) { foreach (var action in evenHandlers) { action(parameter); } }
public static void PublishEvent(string eventName, EventArg parameter) { if (dic.ContainsKey(eventName)) { ExecuteHandlers(dic[eventName], parameter); } }