示例#1
0
        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();
            }
        }
示例#2
0
        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();
            }
        }
示例#3
0
        public WindowsService()
        {
            ServiceName  = Name;
            EventLog.Log = "Application";

            CanHandlePowerEvent         = false;
            CanHandleSessionChangeEvent = false;
            CanPauseAndContinue         = false;
            CanShutdown = true;
            CanStop     = true;

            _reversedProxyServer = new Business.ReversedProxyServer();
        }
        public WindowsService()
        {
            ServiceName = Name;
            EventLog.Log = "Application";

            CanHandlePowerEvent = false;
            CanHandleSessionChangeEvent = false;
            CanPauseAndContinue = false;
            CanShutdown = true;
            CanStop = true;

            _reversedProxyServer = new Business.ReversedProxyServer();
        }