Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public static bool Init()
 {
     return(PveInfoMgr.ReLoad());
 }