/// <summary> /// 保存商城配置信息 /// </summary> public static void SaveMallConfig(MallConfigInfo mallConfigInfo) { lock (_locker) { if (_iconfigstrategy.SaveMallConfig(mallConfigInfo)) { _mallconfiginfo = mallConfigInfo; } } }
private static RabbitMQOrderConfigInfo _rabbitmqorderconfiginfo = null; //RabbitMQ订单配置信息 static BMAConfig() { try { string[] fileNameList = Directory.GetFiles(System.Web.HttpRuntime.BinDirectory, "NStore.ConfigStrategy.*.dll", SearchOption.TopDirectoryOnly); _iconfigstrategy = (IConfigStrategy)Activator.CreateInstance(Type.GetType(string.Format("NStore.ConfigStrategy.{0}.ConfigStrategy, NStore.ConfigStrategy.{0}", fileNameList[0].Substring(fileNameList[0].LastIndexOf("ConfigStrategy.") + 15).Replace(".dll", "")), false, true)); } catch { throw new BMAException("创建'配置策略对象'失败,可能存在的原因:未将'配置策略程序集'添加到bin目录中;'配置策略程序集'文件名不符合'NStore.ConfigStrategy.{策略名称}.dll'格式"); } _rdbsconfiginfo = _iconfigstrategy.GetRDBSConfig(); _mallconfiginfo = _iconfigstrategy.GetMallConfig(); }