public IDBTable getMemDBTalbe(string name) { AEDBMemTable obj = null; _memtables.TryGetValue(name, out obj); return((IDBTable)obj); }
public bool init(object config) { Debug.logger.log(LogType.LOG_SYSTEM, "AEServer Start Initialize DBManager ..."); dynamic conf = config; // initialize DB DBMySqlManager.manager.init(conf.mysql); DBRedisManager.manager.init(conf.redis); // initialize tables foreach (var item in conf.memtables) { AEDBMemTable tab = new AEDBMemTable(); if (!tab.init(item)) { // error continue; } _memtables[item.name] = tab; } foreach (var item in conf.persisttables) { AEDBPersistTable tab = new AEDBPersistTable(); if (!tab.init(item)) { // error continue; } _persisttables[item.name] = tab; } Debug.logger.log(LogType.LOG_SYSTEM, "AEServer Initialize DBManager redis OK!"); return(true); }