Ejemplo n.º 1
0
        public static bool ReLoad()
        {
            bool result;

            try
            {
                Dictionary <string, FusionInfo> tempFusions = new Dictionary <string, FusionInfo>();
                if (FusionMgr.LoadFusion(tempFusions))
                {
                    FusionMgr.m_lock.AcquireWriterLock(-1);
                    try
                    {
                        FusionMgr._fusions = tempFusions;
                        result             = true;
                        return(result);
                    }
                    catch
                    {
                    }
                    finally
                    {
                        FusionMgr.m_lock.ReleaseWriterLock();
                    }
                }
            }
            catch (Exception e)
            {
                //if (FusionMgr.log.IsErrorEnabled)
                {
                    FusionMgr.log.Error("FusionMgr", e);
                }
            }
            result = false;
            return(result);
        }
Ejemplo n.º 2
0
 public static bool ReLoad()
 {
     try
     {
         Dictionary <string, FusionInfo> dictionary = new Dictionary <string, FusionInfo>();
         if (FusionMgr.LoadFusion(dictionary))
         {
             FusionMgr.m_lock.AcquireWriterLock(15000);
             try
             {
                 FusionMgr._fusions = dictionary;
                 return(true);
             }
             catch
             {
             }
             finally
             {
                 FusionMgr.m_lock.ReleaseWriterLock();
             }
         }
     }
     catch (Exception exception)
     {
         if (FusionMgr.log.IsErrorEnabled)
         {
             FusionMgr.log.Error("FusionMgr", exception);
         }
     }
     return(false);
 }
Ejemplo n.º 3
0
        public static bool Init()
        {
            bool result;

            try
            {
                FusionMgr.m_lock   = new ReaderWriterLock();
                FusionMgr._fusions = new Dictionary <string, FusionInfo>();
                result             = FusionMgr.LoadFusion(FusionMgr._fusions);
            }
            catch (Exception e)
            {
                //	if (FusionMgr.log.IsErrorEnabled)
                {
                    FusionMgr.log.Error("FusionMgr", e);
                }
                result = false;
            }
            return(result);
        }