示例#1
0
        public static ArgsOptions Parse(string[] args)
        {
            var options = new ArgsOptions();

            Parser.Default.ParseArguments(args, options);
            return(options);
        }
示例#2
0
        static void Main(string[] args)
        {
            var options = ArgsOptions.Parse(args);

            string configJson = options.ConfigJson;

            if (string.IsNullOrEmpty(configJson))
            {
                configJson = File.ReadAllText(options.ConfigPath);
            }
            GameServerLauncher.LaunchServer(options.ServerPort, configJson);
        }