using RDIFramework.Utilities; using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.IO; using System.Linq; using System.Text; using Topshelf; namespace TimedUpload { class Program { private static string programName = ConfigurationManager.AppSettings["serverName"]; static void Main(string[] args) { log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config")); try { HostFactory.Run(x => { x.UseLog4Net(); x.Service(); x.SetDescription(programName); x.SetDisplayName(programName); x.SetServiceName(programName); x.EnablePauseAndContinue(); }); } catch (Exception ex) { throw ex; } } } }