Beispiel #1
0
        private static ISessionStrategy _isessionstrategy = null;//会话状态策略

        static BSPSession()
        {
            try
            {
                string[] fileNameList = Directory.GetFiles(System.Web.HttpRuntime.BinDirectory, "OWZX.SessionStrategy.*.dll", SearchOption.TopDirectoryOnly);
                _isessionstrategy = (ISessionStrategy)Activator.CreateInstance(Type.GetType(string.Format("OWZX.SessionStrategy.{0}.SessionStrategy, OWZX.SessionStrategy.{0}", fileNameList[0].Substring(fileNameList[0].IndexOf("SessionStrategy.") + 16).Replace(".dll", "")),
                                                                                            false,
                                                                                            true));
            }
            catch
            {
                throw new BSPException("创建'会话状态策略对象'失败,可能存在的原因:未将'会话状态策略程序集'添加到bin目录中;'会话状态策略程序集'文件名不符合'OWZX.SessionStrategy.{策略名称}.dll'格式");
            }
        }
Beispiel #2
0
        private static ISessionStrategy _isessionstrategy = null;//会话状态策略

        static BMASession()
        {
            try
            {
                string[] fileNameList = Directory.GetFiles(System.Web.HttpRuntime.BinDirectory, "BrnMall.SessionStrategy.*.dll", SearchOption.TopDirectoryOnly);
                _isessionstrategy = (ISessionStrategy)Activator.CreateInstance(Type.GetType(string.Format("BrnMall.SessionStrategy.{0}.SessionStrategy, BrnMall.SessionStrategy.{0}", fileNameList[0].Substring(fileNameList[0].IndexOf("SessionStrategy.") + 16).Replace(".dll", "")),
                                                                                           false,
                                                                                           true));
            }
            catch
            {
                throw new BMAException("创建'会话状态策略对象'失败,可能存在的原因:未将'会话状态策略程序集'添加到bin目录中;'会话状态策略程序集'文件名不符合'BrnMall.SessionStrategy.{策略名称}.dll'格式");
            }
        }
Beispiel #3
0
 /// <summary>
 /// 加载会话状态策略
 /// </summary>
 private static void Load()
 {
     try
     {
         string[] fileNameList = Directory.GetFiles(System.Web.HttpRuntime.BinDirectory, "BonSite.SessionStrategy.*.dll", SearchOption.TopDirectoryOnly);
         _sessionstrategy = (ISessionStrategy)Activator.CreateInstance(Type.GetType(string.Format("BonSite.SessionStrategy.{0}.SessionStrategy, BonSite.SessionStrategy.{0}", fileNameList[0].Substring(fileNameList[0].IndexOf("SessionStrategy.") + 16).Replace(".dll", "")),
                                                                                    false,
                                                                                    true));
     }
     catch
     {
         throw new BSException("创建\"会话状态策略对象\"失败,可能存在的原因:未将\"会话状态策略程序集\"添加到bin目录中;将多个\"会话状态策略程序集\"添加到bin目录中;\"会话状态策略程序集\"文件名不符合\"BonSite.SessionStrategy.{策略名称}.dll\"格式");
     }
 }
Beispiel #4
0
        private static ISessionStrategy _isessionstrategy = null; //会话状态策略

        #endregion Fields

        #region Constructors

        static Sessions()
        {
            _isessionstrategy = BSPSession.Instance;
        }
Beispiel #5
0
        private static ISessionStrategy _isessionstrategy = null;//会话状态策略

        static Sessions()
        {
            _isessionstrategy = BMASession.Instance;
        }
Beispiel #6
0
        private static ISessionStrategy _isessionstrategy = null;//会话状态策略

        static HaSession()
        {
            _isessionstrategy = new SessionStrategy();
        }