protected override void OnStart(string[] args) { mBolStarted = true; try { mObjListeners.StartListener(); QsLog.WriteInfo("Servicio iniciado."); } catch (Exception lObjException) { QsLog.WriteException(lObjException); mBolStarted = false; base.Stop(); } }
static void Main(string[] args) { #if DEBUG ServicesListener lObjListeners = new ServicesListener(); lObjListeners.StartListener(); Console.WriteLine("\nPress ENTER to continue..."); Console.ReadLine(); #else try { ServiceBase[] ServicesToRun = new ServiceBase[] { new QualisysAuditService() }; ServiceBase.Run(ServicesToRun); } catch (Exception lObjException) { QsLog.WriteException(lObjException); } #endif }