Пример #1
0
 /// <summary>
 /// 写入站点配置文件
 /// </summary>
 private SysWebSite saveConifg(SysWebSite model, string configFilePath)
 {
     lock (lockHelper)
     {
         SerializationHelper.Save(model, configFilePath);
     }
     return(model);
 }
Пример #2
0
        /// <summary>
        ///  读取配置文件
        /// </summary>
        public SysWebSite loadConfig()
        {
            SysWebSite model = CacheHelper.Get <SysWebSite>(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 <SysWebSite>(SysKeys.CACHE_SYS_CONFIG);
            }
            return(model);
        }
Пример #3
0
 /// <summary>
 ///  保存配置文件
 /// </summary>
 public SysWebSite saveConifg(SysWebSite model)
 {
     return(saveConifg(model, Utils.GetXmlMapPath(SysKeys.FILE_SYS_XML_CONFING)));
 }