Shutdown() public method

Stops all running proxy servers and the REST API.
public Shutdown ( ) : void
return void
Example #1
0
        /// <summary>
        ///     Runs the instance of the Stumps server.
        /// </summary>
        public void RunInstance()
        {
            this.MessageWriter.Information(StartupResources.StartupStarting);

            using (var server = new StumpsRunner(this.Configuration))
            {
                server.Start();
                this.MessageWriter.Information(StartupResources.StartupComplete);

                Console.ReadLine();

                this.MessageWriter.Information(StartupResources.ShutdownStarting);
                server.Shutdown();
                this.MessageWriter.Information(StartupResources.ShutdownComplete);
            }
        }
Example #2
0
        /// <summary>
        ///     Runs the instance of the Stumps server.
        /// </summary>
        public void RunInstance()
        {
            this.MessageWriter.Information(StartupResources.StartupStarting);

            using (var server = new StumpsRunner(this.Configuration))
            {
                server.Start();
                this.MessageWriter.Information(StartupResources.StartupComplete);

                Console.ReadLine();

                this.MessageWriter.Information(StartupResources.ShutdownStarting);
                server.Shutdown();
                this.MessageWriter.Information(StartupResources.ShutdownComplete);
            }
        }
Example #3
0
 /// <summary>
 ///     Executes when a Stop command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service stops running.
 /// </summary>
 protected override void OnStop()
 {
     _server.Shutdown();
 }