public ServiceEventsImpl()
 {
     _afterStart = new EventCallbackList<HostStartedContext>();
     _afterStop = new EventCallbackList<HostStoppedContext>();
     _beforeStart = new EventCallbackList<HostStartContext>();
     _beforeStop = new EventCallbackList<HostStopContext>();
 }
Exemple #2
0
    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);
        }
    }
Exemple #3
0
 public VoxelMap(EventHub events)
 {
     Events            = events;
     _chunkCreatedList = Events.GetList(typeof(VoxelChunkCreatedEvent));
 }