/// <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 Start command is sent to the service by the Service Control Manager (SCM) or when the operating system starts (for a service that starts automatically). Specifies actions to take when the service starts. /// </summary> /// <param name="args">Data passed by the start command.</param> protected override void OnStart(string[] args) { _server.Start(); }