Пример #1
0
 public static bool ReLoad()
 {
     try
     {
         Dictionary <int, GoldEquipTemplateLoadInfo> infos = new Dictionary <int, GoldEquipTemplateLoadInfo>();
         if (GoldEquipMgr.LoadItem(infos))
         {
             GoldEquipMgr.m_lock.AcquireWriterLock(15000);
             try
             {
                 GoldEquipMgr._items = infos;
                 return(true);
             }
             catch
             {
             }
             finally
             {
                 GoldEquipMgr.m_lock.ReleaseWriterLock();
             }
         }
     }
     catch (Exception ex)
     {
         if (GoldEquipMgr.log.IsErrorEnabled)
         {
             GoldEquipMgr.log.Error((object)"ReLoad", ex);
         }
     }
     return(false);
 }
Пример #2
0
        public static bool Init()
        {
            bool flag;

            try
            {
                GoldEquipMgr.m_lock = new ReaderWriterLock();
                GoldEquipMgr._items = new Dictionary <int, GoldEquipTemplateLoadInfo>();
                flag = GoldEquipMgr.LoadItem(GoldEquipMgr._items);
            }
            catch (Exception ex)
            {
                if (GoldEquipMgr.log.IsErrorEnabled)
                {
                    GoldEquipMgr.log.Error((object)"Init", ex);
                }
                flag = false;
            }
            return(flag);
        }
Пример #3
0
        public static bool Init()
        {
            bool result;

            try
            {
                GoldEquipMgr.m_lock = new ReaderWriterLock();
                GoldEquipMgr._items = new Dictionary <int, GoldEquipTemplateLoadInfo>();
                result = GoldEquipMgr.LoadItem(GoldEquipMgr._items);
            }
            catch (Exception exception)
            {
                if (GoldEquipMgr.log.IsErrorEnabled)
                {
                    GoldEquipMgr.log.Error("Init", exception);
                }
                result = false;
            }
            return(result);
        }