static void Main(string[] args) { try { Console.WriteLine("Press any key to terminate the reverse proxy server..."); Business.ReversedProxyServer reversedProxyServer = null; try { reversedProxyServer = new Business.ReversedProxyServer(); reversedProxyServer.Start(); } catch (Exception exception) { Console.WriteLine(exception.Message); } finally { Console.ReadKey(); if (reversedProxyServer != null) reversedProxyServer.Stop(); } } catch (Exception exception) { Console.WriteLine(exception.Message); Console.ReadKey(); } }
static void Main(string[] args) { try { Console.WriteLine("Press any key to terminate the reverse proxy server..."); Business.ReversedProxyServer reversedProxyServer = null; try { reversedProxyServer = new Business.ReversedProxyServer(); reversedProxyServer.Start(); } catch (Exception exception) { Console.WriteLine(exception.Message); } finally { Console.ReadKey(); if (reversedProxyServer != null) { reversedProxyServer.Stop(); } } } catch (Exception exception) { Console.WriteLine(exception.Message); Console.ReadKey(); } }
public WindowsService() { ServiceName = Name; EventLog.Log = "Application"; CanHandlePowerEvent = false; CanHandleSessionChangeEvent = false; CanPauseAndContinue = false; CanShutdown = true; CanStop = true; _reversedProxyServer = new Business.ReversedProxyServer(); }