/// <summary> /// Register an event with an action with a paramter /// </summary> /// <typeparam name="T"></typeparam> /// <param name="event"></param> /// <param name="body"></param> /// <returns></returns> public Emitter <T> On <T>(string @event, Action <T> body) { var e = new Emitter <T>(@event, body); Emitters.TryAdd(e.Event, e); return(e); }
/// <summary> /// Register an event with an action /// </summary> /// <param name="event"></param> /// <param name="body"></param> /// <returns></returns> public Emitter On(string @event, Action body) { var e = new Emitter(@event, body); Emitters.TryAdd(e.Event, e); return(e); }