Init() public static method

public static Init ( string fileName ) : void
fileName string
return void
コード例 #1
0
        public static void Main(string[] args)
        {
#if !DEBUG
            try
            {
#endif
            Config.Load(args);

            BanlistManager.Init(Config.GetString("BanlistFile", "lflist.conf"));
            Api.Init(Config.GetString("RootPath", "."), Config.GetString("ScriptDirectory", "script"), Config.GetString("DatabaseFile", "cards.cdb"));

            ClientVersion = Config.GetUInt("ClientVersion", ClientVersion);

            CoreServer server = new CoreServer();
            server.Start();
            while (server.IsRunning)
            {
                server.Tick();
                Thread.Sleep(1);
            }
#if !DEBUG
        }

        catch (Exception ex)
        {
            File.WriteAllText("crash_" + DateTime.UtcNow.ToString("yyyy-MM-dd_HH-mm-ss") + ".txt", ex.ToString());
        }
#endif
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Ygocore/ygosharp_v0.1.1
        public static void Main(string[] args)
        {
            try {
                CoreConfig config = new CoreConfig();
                if (args.Length != 2 || !config.Load(args[0], args[1]))
                {
                    return;
                }

                BanlistManager.Init("lflist.conf");
                Api.Init();

                CoreServer server = new CoreServer(config);
                server.Start();
                while (server.IsRunning)
                {
                    server.Tick();
                    Thread.Sleep(1);
                }
            }
            catch (Exception ex) {
                File.WriteAllText("crash_" + DateTime.UtcNow.ToString("yyyy-MM-dd_HH-mm-ss") + ".txt", ex.ToString());
            }
        }