public ClientHandler(Socket client, ICache manager, EventHandler <CustomEventArgs> handler, EventsRegistry eventsRegistry)
 {
     _messenger      = new Messenger(client, handler);
     dataManager     = manager;
     _eventsRegistry = eventsRegistry;
     _notifier       = new Notifier(eventsRegistry, handler);
     RaiseEvent     += handler;
     HandleClient(client);
 }
 public Server(IPEndPoint iPEndPoint, EventHandler <CustomEventArgs> handler, int max, int time)
 {
     _dataManager    = DataManager.GetInstance(handler, max, time);
     _clientHandlers = new List <ClientHandler>();
     _eventsRegistry = new EventsRegistry();
     _iPEndPoint     = iPEndPoint;
     _handler        = handler;
     RaiseEvent     += handler;
     //StartServer(iPEndPoint, handler);
 }
 public Notifier(EventsRegistry registry, EventHandler <CustomEventArgs> handler)
 {
     _eventsRegistry = registry;
     _messenger      = new Messenger(handler);
 }