/// <summary> /// The main entry point for the application. /// </summary> static void Main() { XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "Config/logging.config")); #if DEBUG VNSService service = new VNSService(); service.Processing(); #else ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new ScheduleService() }; ServiceBase.Run(ServicesToRun); #endif }
private void timer_Tick(object sender, ElapsedEventArgs args) { try { timer.Stop(); VNSService srv = new VNSService(); srv.Processing(); } catch (Exception ex) { log.Error(ex); } finally { timer.Start(); } }