示例#1
0
        /// <summary>
        /// Runs the application as a simple console application.
        /// </summary>
        private static void RunConsoleApplication()
        {
            Console.WriteLine(Const.Messages.ServiceStartRequested);

            var control = new ServiceControl();

            control.Start();

            Console.WriteLine(Const.Messages.PressAnyKeyToStop);
            Console.ReadKey();

            control.Stop();
        }
示例#2
0
        /// <summary>
        /// Runs the application as a simple console application.
        /// </summary>
        private static void RunConsoleApplication()
        {
            Console.WriteLine(Const.Messages.ServiceStartRequested);

            var control = new ServiceControl();

            control.Start();

            Console.WriteLine(Const.Messages.PressAnyKeyToStop);
            Console.ReadKey();

            control.Stop();
        }
示例#3
0
 /// <summary>
 /// Handles the 'start' service control command.
 /// </summary>
 /// <param name="args">Ignored.</param>
 protected override void OnStart(string[] args)
 {
     _service.Start();
 }