private static void Main(string[] args) { Console.CancelKeyPress += Console_CancelKeyPress; _zoneProvider = new APZoneProvider(); _zoneResolver = new SmartZoneResolver(); _dnsServer = new DnsServer(); _httpServer = new HttpServer(); _zoneResolver.SubscribeTo(_zoneProvider); _zoneProvider.Initialize("d:\\data\\machineinfo.csv", ".foo.bar"); _dnsServer.Initialize(_zoneResolver); _httpServer.Initialize("http://+:8080/"); _httpServer.OnProcessRequest += _httpServer_OnProcessRequest; _httpServer.OnHealthProbe += _httpServer_OnHealthProbe; _zoneProvider.Start(); _dnsServer.Start(); _httpServer.Start(); _exit.WaitOne(); _httpServer.Stop(); _dnsServer.Stop(); _zoneProvider.Stop(); _exitTimeout.Set(); }