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