示例#1
0
        private static void RunInConsoleMode()
        {
            Console.WriteLine("Running in console mode.");
            _log.Debug("Running in console mode.");

            _mainDaemon = new MainDaemon();
            _mainDaemon.Start();
            Console.WriteLine("Press Enter to stop the service...");
            Console.ReadLine();
            _mainDaemon.Stop();

            _log.Debug("Finished in console mode.");
        }
示例#2
0
 protected override void OnStop()
 {
     _mainDaemon.Stop();
 }