/// <summary> /// Initializes a new instance of the <see cref="T:Stumps.StumpsService"/> class. /// </summary> /// <param name="configuration">The configuration.</param> /// <exception cref="System.ArgumentNullException"><paramref name="configuration"/> is <c>null</c>.</exception> public StumpsService(StumpsConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException("configuration"); } InitializeComponent(); _server = new StumpsRunner(configuration); }
/// <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); } }