Пример #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>

        static void Main()
        {
#if DEBUG
            var service = new MessageListener();
            service.DoWork();
#else
            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[]
            {
                new MessageLogService()
            };
            ServiceBase.Run(ServicesToRun);
#endif
        }
Пример #2
0
        protected override void OnStart(string[] args)
        {
            var service = new MessageListener();

            service.DoWork();
        }