Esempio n. 1
0
        static void Main(string[] args)
        {
            string baseAddress = Startup.Start();

            Console.WriteLine("Listening at {0}", baseAddress);
            Console.WriteLine("Return to close");
            Console.ReadLine();
            Startup.Shutdown();
        }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
 protected override void OnStop()
 {
     Startup.Shutdown();
 }