protected override void OnStart(string[] args) { try { try { ServiceEventLogger.WriteEntry("Uploader Start SuccessFully"); } catch (Exception ex) { Log.ErrorFormat("Unable to log to System Eventlog:\nException Msg: {0}", ex.Message); } ExchangeManager = new ExchangeManager(); ExchangeManager.StartTimer(); } catch (Exception ex) { Log.ErrorFormat("Fatal Exception Occured in Service:\nException Msg: {0}\nExcpetion Stack Trace: {1}", ex.Message, ex.StackTrace); } }
//TODO should implement IDisposable public WindowsServiceEmulator() : base("Ticket Evolution AutoUploader") { ExchangeManager = new ExchangeManager(); }