示例#1
0
        private void RemoveDataFromSession(string key)
        {
            HttpSessionState session = HttpContextHelper.SafeGetSession();

            if (session != null)
            {
                session.Remove(key);
            }
            else if (_InternalStorage.ContainsKey(key))
            {
                _InternalStorage.Remove(key);
            }
        }
示例#2
0
        private void SetDataInSession(string key, object value)
        {
            HttpSessionState session = HttpContextHelper.SafeGetSession();

            if (session != null)
            {
                session[key] = value;
            }
            else
            {
                _InternalStorage[key] = value;
            }
        }
示例#3
0
        private object GetDataFromSession(string key)
        {
            HttpSessionState session = HttpContextHelper.SafeGetSession();

            if (session != null)
            {
                return(session[key]);
            }
            else if (_InternalStorage.ContainsKey(key))
            {
                return(_InternalStorage[key]);
            }
            else
            {
                return(null);
            }
        }