public static bool ReLoad() { try { Dictionary <int, PveInfo> dictionary = PveInfoMgr.LoadFromDatabase(); if (dictionary.Count > 0) { Interlocked.Exchange <Dictionary <int, PveInfo> >(ref PveInfoMgr.m_pveInfos, dictionary); } return(true); } catch (Exception exception) { PveInfoMgr.log.Error("PveInfoMgr", exception); } return(false); }
public static bool ReLoad() { bool result; try { Dictionary <int, PveInfo> tempPve = PveInfoMgr.LoadFromDatabase(); if (tempPve.Count > 0) { Interlocked.Exchange <Dictionary <int, PveInfo> >(ref PveInfoMgr.m_pveInfos, tempPve); } result = true; return(result); } catch (Exception e) { PveInfoMgr.log.Error("PveInfoMgr", e); } result = false; return(result); }
public static bool Init() { return(PveInfoMgr.ReLoad()); }