예제 #1
0
 /// <summary>
 /// 保存插件设置
 /// </summary>
 public static void SavePluginSet(PluginSetInfo pluginSetInfo)
 {
     lock (_locker)
     {
         IOHelper.SerializeToXml(pluginSetInfo, IOHelper.GetMapPath(_dbfilepath));
         _pluginsetinfo = null;
         TenpayUtil.ReSet();
     }
 }
예제 #2
0
        private static string _dbfilepath           = "/plugins/OWZX.PayPlugin.Tenpay/db.config"; //数据文件路径

        /// <summary>
        ///获得插件设置
        /// </summary>
        /// <returns></returns>
        public static PluginSetInfo GetPluginSet()
        {
            if (_pluginsetinfo == null)
            {
                lock (_locker)
                {
                    if (_pluginsetinfo == null)
                    {
                        _pluginsetinfo = (PluginSetInfo)IOHelper.DeserializeFromXML(typeof(PluginSetInfo), IOHelper.GetMapPath(_dbfilepath));
                    }
                }
            }
            return(_pluginsetinfo);
        }