コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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
        }