public override void Execute(HostArguments args)
        {
            using (var service = new Host(args))
            {
                service.Run();

                if (!Environment.UserInteractive)
                {
                    return;
                }

                Process.Start(args.Url);
                Console.WriteLine("Running on {0}", args.Url);
                Console.WriteLine("Press enter to exit");
                Console.ReadLine();
            }
        }
        public override void Execute(HostArguments args)
        {
            if (!Environment.UserInteractive)
            {
                using (var service = new Host())
                {
                    service.Run();
                }

                return;
            }

            using (var service = new Host())
            {
                using (var waitHandle = new ManualResetEvent(false))
                {
                    service.OnStopping = () =>
                    {
                        service.OnStopping = () => { };
                        waitHandle.Set();
                    };

                    service.Run();

                    Console.CancelKeyPress += (sender, e) =>
                    {
                        service.OnStopping = () => { };
                        e.Cancel = true;
                        waitHandle.Set();
                    };

                    Console.WriteLine("Press Ctrl+C to exit");
                    waitHandle.WaitOne();
                }
            }
        }