Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
        private void SetDataInSession(string key, object value)
        {
            HttpSessionState session = HttpContextHelper.SafeGetSession();

            if (session != null)
            {
                session[key] = value;
            }
            else
            {
                _InternalStorage[key] = value;
            }
        }
Exemplo n.º 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);
            }
        }