Пример #1
0
 /// <summary>
 /// 写入站点配置文件
 /// </summary>
 private sysconfig saveConifg(sysconfig model, string configFilePath)
 {
     lock (lockHelper)
     {
         SerializationHelper.Save(model, configFilePath);
     }
     return(model);
 }
Пример #2
0
        /// <summary>
        ///  读取配置文件
        /// </summary>
        public sysconfig loadConfig()
        {
            sysconfig model = CacheHelper.Get <sysconfig>(SysKeys.CACHE_SYS_CONFIG);

            if (model == null)
            {
                string path = Utils.GetXmlMapPath(SysKeys.FILE_SYS_XML_CONFING);
                CacheHelper.Insert(SysKeys.CACHE_SYS_CONFIG, loadConfig(path),
                                   Utils.GetXmlMapPath(SysKeys.FILE_SYS_XML_CONFING));
                model = CacheHelper.Get <sysconfig>(SysKeys.CACHE_SYS_CONFIG);
            }
            return(model);
        }
Пример #3
0
 /// <summary>
 ///  保存配置文件
 /// </summary>
 public sysconfig saveConifg(sysconfig model)
 {
     return(saveConifg(model, Utils.GetXmlMapPath(SysKeys.FILE_SYS_XML_CONFING)));
 }