Stumps.StumpsRunner.Shutdown C# (CSharp) Method

Shutdown() public method

Stops all running proxy servers and the REST API.
public Shutdown ( ) : void
return void
        public void Shutdown()
        {
            lock (_syncRoot)
            {
                if (!_started)
                {
                    return;
                }

                _started = false;

                _webServer.Shutdown();
                _host.Shutdown();

                _host.Dispose();
                _webServer.Dispose();

            }
        }

Usage Example

Esempio n. 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);
            }
        }
All Usage Examples Of Stumps.StumpsRunner::Shutdown