public static void Initialize()
        {
            Banips.Clear();
            BannedIpDAO bannedIpDAO = DAOManager.BannedIpDAO;
            object      banips      = Banips;

            bannedIpDAO.LoadBanedIP(ref banips);
            Banips = (Dictionary <string, BannedIP>)banips;
            log.InfoFormat("载入 {0} 个禁止连接的IP地址", (object)Banips.Count);
            Clean();
        }
Beispiel #2
0
 public static void Initialize()
 {
     if (!DAO.Connect())
     {
         throw new ArgumentException("无法连接到数据库,请检查连接设置。");
     }
     log.Info((object)"数据库连接成功!");
     GameDAO        = new GameServerDAO();
     AccountDAO     = new AccountDAO();
     BannedIpDAO    = new BannedIpDAO();
     AccountTimeDAO = new AccountTimeDAO();
     LoginRewardDAO = new LoginRewardDAO();
     LunaDAO        = new LunaDAO();
     PayInfoDAO     = new PayInfoDAO();
     PayRewardDAO   = new PayRewardDAO();
 }