Ejemplo n.º 1
0
 protected override object DeserializeSession(byte[] buffer, int timeout)
 {
     if (buffer != null)
     {
         return(SessionSerializationUtil.Deserialize(buffer));
     }
     else
     {
         return(new SessionStateStoreData(new SessionStateItemCollection(), null, timeout));
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Extract session data from hastable fetched from cache
        /// </summary>
        /// <param name="context"></param>
        /// <param name="items"></param>
        /// <param name="flag"></param>
        /// <returns></returns>
        private SessionStateStoreData GetContents(HttpContext context, Hashtable items, ref SessionStateActions flag)
        {
            flag = (SessionStateActions)items[ACTIONS_KEY];
            byte[] buffer  = items[SESSION_DATA] as byte[];
            int    timeout = (int)items[TIMEOUT_KEY];

            if (buffer != null)
            {
                return(SessionSerializationUtil.Deserialize(buffer));
            }

            return(new SessionStateStoreData(new SessionStateItemCollection(), null, timeout));
        }