StopService() public method

public StopService ( ) : void
return void
示例#1
0
        private static void DoRun(IDictionary <string, string> options)
        {
            Service svc = new Service();

            svc.StartService(new String[0]);

            Console.WriteLine("Press q to shutdown.");
            Console.WriteLine("Press t for a thread dump.");

            while (true)
            {
                ConsoleKeyInfo info = Console.ReadKey();
                if (info.KeyChar == 'q')
                {
                    break;
                }
                else if (info.KeyChar == 't')
                {
                    svc.DumpRequests();
                }
            }

            svc.StopService();
        }
示例#2
0
        private static void DoRun(IDictionary<string, string> options)
        {
            Service svc = new Service();

            svc.StartService(new String[0]);

            Console.WriteLine("Press q to shutdown.");
            Console.WriteLine("Press t for a thread dump.");

            while (true)
            {
                ConsoleKeyInfo info = Console.ReadKey();
                if (info.KeyChar == 'q')
                {
                    break;
                }
                else if (info.KeyChar == 't')
                {
                    svc.DumpRequests();
                }
            }

            svc.StopService();
        }