Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            XmlConfigurator.Configure();

            try
            {
                if (!ServerOptions.TryGetArguments(args, out var parsedArguments))
                {
                    return;
                }

                var server = new ClusterServer(parsedArguments, Log);
                server.Start();

                Console.ReadLine();
                Log.InfoFormat("Server stopped!");
            }
            catch (Exception e)
            {
                Log.Fatal(e);
            }
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            // XmlConfigurator.Configure(LogManager.GetRepository(Assembly.GetCallingAssembly()), new FileInfo("log4net.config"));

            try
            {
                if (!ServerOptions.TryGetArguments(args, out var parsedArguments))
                {
                    return;
                }

                var server = new ClusterServer(parsedArguments);
                server.Start();

                Console.WriteLine("Press ENTER to stop listening");
                Console.ReadLine();
                Console.WriteLine("Server stopped!");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }