public ServiceEventsImpl() { _afterStart = new EventCallbackList<HostStartedContext>(); _afterStop = new EventCallbackList<HostStoppedContext>(); _beforeStart = new EventCallbackList<HostStartContext>(); _beforeStop = new EventCallbackList<HostStopContext>(); }
public void Listen(string name, CallBack handler) { if (handler == null) { return; } EventCallbackList dol; if (!eventTable.TryGetValue(name, out dol)) { dol = new EventCallbackList(); eventTable [name] = dol; } dol.Add(handler); if (parent != null) { parent.Listen(name, handler); } }
public VoxelMap(EventHub events) { Events = events; _chunkCreatedList = Events.GetList(typeof(VoxelChunkCreatedEvent)); }