Example #1
0
        private static EmailConfigInfo _emailConfigInfo = null; //邮件相关配置

        static BSConfig()
        {
            Load();
            //_sysconfiginfo=_sysconfiginfo
            _rdbsconfiginfo  = _configstrategy.GetRDBSConfig();
            _sysconfiginfo   = _configstrategy.GetSysConfig();
            _siteconfiginfo  = _configstrategy.GetSiteConfig();
            _routeconfiginfo = _configstrategy.GetRouteConfig();
            _emailConfigInfo = _configstrategy.GetEmailConfig();
        }
Example #2
0
        private static RabbitMQOrderConfigInfo _rabbitmqorderconfiginfo       = null; //RabbitMQ订单配置信息

        static BMAConfig()
        {
            try
            {
                string[] fileNameList = Directory.GetFiles(System.Web.HttpRuntime.BinDirectory, "BrnMall.ConfigStrategy.*.dll", SearchOption.TopDirectoryOnly);
                _iconfigstrategy = (IConfigStrategy)Activator.CreateInstance(Type.GetType(string.Format("BrnMall.ConfigStrategy.{0}.ConfigStrategy, BrnMall.ConfigStrategy.{0}", fileNameList[0].Substring(fileNameList[0].LastIndexOf("ConfigStrategy.") + 15).Replace(".dll", "")),
                                                                                          false,
                                                                                          true));
            }
            catch
            {
                throw new BMAException("创建'配置策略对象'失败,可能存在的原因:未将'配置策略程序集'添加到bin目录中;'配置策略程序集'文件名不符合'BrnMall.ConfigStrategy.{策略名称}.dll'格式");
            }
            _rdbsconfiginfo = _iconfigstrategy.GetRDBSConfig();
            _mallconfiginfo = _iconfigstrategy.GetMallConfig();
        }
Example #3
0
        private static SMSConfigInfo _smsconfiginfo = null; //短信配置信息

        #endregion Fields

        #region Constructors

        static BSPConfig()
        {
            try
            {
                string[] fileNameList = Directory.GetFiles(System.Web.HttpRuntime.BinDirectory, "BrnShop.ConfigStrategy.*.dll", SearchOption.TopDirectoryOnly);
                _iconfigstrategy = (IConfigStrategy)Activator.CreateInstance(Type.GetType(string.Format("BrnShop.ConfigStrategy.{0}.ConfigStrategy, BrnShop.ConfigStrategy.{0}", fileNameList[0].Substring(fileNameList[0].LastIndexOf("ConfigStrategy.") + 15).Replace(".dll", "")),
                                                                                         false,
                                                                                         true));
            }
            catch
            {
                throw new BSPException("创建'配置策略对象'失败,可能存在的原因:未将'配置策略程序集'添加到bin目录中;'配置策略程序集'文件名不符合'BrnShop.ConfigStrategy.{策略名称}.dll'格式");
            }
            _rdbsconfiginfo = _iconfigstrategy.GetRDBSConfig();
            _shopconfiginfo = _iconfigstrategy.GetShopConfig();
        }