static void Main(string[] args) { string baseAddress = Startup.Start(); Console.WriteLine("Listening at {0}", baseAddress); Console.WriteLine("Return to close"); Console.ReadLine(); Startup.Shutdown(); }
private void UnhandledException(object sender, UnhandledExceptionEventArgs e) { WriteEventLog(EventLogEntryType.Error, "Unhandled Exception (terminating: {0})\r\n{1}", e.IsTerminating, e.ExceptionObject); if (e.IsTerminating) { Startup.Shutdown(); } }
protected override void OnStop() { Startup.Shutdown(); }