public static bool ReLoad() { try { Dictionary <int, TotemInfo> totem = new Dictionary <int, TotemInfo>(); if (TotemMgr.Load(totem)) { TotemMgr.m_lock.AcquireWriterLock(15000); try { TotemMgr._totem = totem; return(true); } catch { } finally { TotemMgr.m_lock.ReleaseWriterLock(); } } } catch (Exception ex) { if (TotemMgr.log.IsErrorEnabled) { TotemMgr.log.Error((object)"TotemMgr", ex); } } return(false); }
public static bool ReLoad() { try { Dictionary <int, TotemInfo> consortiaLevel = new Dictionary <int, TotemInfo>(); if (TotemMgr.Load(consortiaLevel)) { TotemMgr.m_lock.AcquireWriterLock(15000); try { TotemMgr._consortiaLevel = consortiaLevel; return(true); } catch { } finally { TotemMgr.m_lock.ReleaseWriterLock(); } } } catch (Exception exception) { if (TotemMgr.log.IsErrorEnabled) { TotemMgr.log.Error("ConsortiaLevelMgr", exception); } } return(false); }
public static bool Init() { bool flag; try { TotemMgr.m_lock = new ReaderWriterLock(); TotemMgr._totem = new Dictionary <int, TotemInfo>(); TotemMgr.rand = new ThreadSafeRandom(); flag = TotemMgr.Load(TotemMgr._totem); } catch (Exception ex) { if (TotemMgr.log.IsErrorEnabled) { TotemMgr.log.Error((object)"TotemMgr", ex); } flag = false; } return(flag); }
public static bool Init() { bool result; try { TotemMgr.m_lock = new ReaderWriterLock(); TotemMgr._consortiaLevel = new Dictionary <int, TotemInfo>(); TotemMgr.rand = new ThreadSafeRandom(); result = TotemMgr.Load(TotemMgr._consortiaLevel); } catch (Exception exception) { if (TotemMgr.log.IsErrorEnabled) { TotemMgr.log.Error("ConsortiaLevelMgr", exception); } result = false; } return(result); }