/// <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); } }
/// <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(); }