Exemplo n.º 1
0
        /// <summary>
        /// 保存配置实例
        /// </summary>
        /// <param name="baseconfiginfo"></param>
        /// <returns></returns>
        public static bool SaveConfig(CacheConfigInfo cacheConfiginfo)
        {
            CacheConfigFileManager acfm = new CacheConfigFileManager();

            CacheConfigFileManager.ConfigInfo = cacheConfiginfo;
            return(acfm.SaveConfig());
        }
Exemplo n.º 2
0
 /// <summary>
 /// 静态构造函数初始化相应实例和定时器
 /// </summary>
 static CacheConfig()
 {
     m_configinfo = CacheConfigFileManager.LoadConfig();
     baseConfigTimer.AutoReset = true;
     baseConfigTimer.Enabled   = true;
     baseConfigTimer.Elapsed  += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
     baseConfigTimer.Start();
 }
Exemplo n.º 3
0
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetRealConfig()
 {
     m_configinfo = CacheConfigFileManager.LoadRealConfig();
 }
Exemplo n.º 4
0
 /// <summary>
 /// 保存配置实例
 /// </summary>
 /// <param name="baseconfiginfo"></param>
 /// <returns></returns>
 public static bool SaveConfig(CacheConfigInfo cacheConfiginfo)
 {
     CacheConfigFileManager acfm = new CacheConfigFileManager();
     CacheConfigFileManager.ConfigInfo = cacheConfiginfo;
     return acfm.SaveConfig();
 }