SaveAll() публичный Метод

Saves the session store into Couchbase
public SaveAll ( IBucket bucket, string id, bool useCas, bool &keyNotFound ) : bool
bucket IBucket Couchbase bucket to save to
id string Session ID
useCas bool True to use a check and set, false to simply store it
keyNotFound bool True if is returned for the body or the header.
Результат bool
Пример #1
0
        /// <summary>
        /// Creates an uninitialized item in the database. This is only used for cookieless sessions
        /// regenerateExpiredSessionId attribute is set to true, which causes SessionStateModule to
        /// generate a new SessionID value when an expired session ID is encountered.
        /// </summary>
        /// <param name="context">HttpContext for the current request</param>
        /// <param name="id">Session ID for the new session</param>
        /// <param name="timeout">Timeout value for the session</param>
        public override void CreateUninitializedItem(HttpContext context, string id, int timeout)
        {
            var e = new SessionStateItem
            {
                Data    = new SessionStateItemCollection(),
                Flag    = SessionStateActions.InitializeItem,
                LockId  = 0,
                Timeout = timeout
            };

            bool keyNotFound;

            e.SaveAll(_bucket, id, false, out keyNotFound);
        }
        /// <summary>
        /// Creates an uninitialized item in the database. This is only used for cookieless sessions
        /// regenerateExpiredSessionId attribute is set to true, which causes SessionStateModule to 
        /// generate a new SessionID value when an expired session ID is encountered.
        /// </summary>
        /// <param name="context">HttpContext for the current request</param>
        /// <param name="id">Session ID for the new session</param>
        /// <param name="timeout">Timeout value for the session</param>
        public override void CreateUninitializedItem(
            HttpContext context,
            string id,
            int timeout)
        {
            var e = new SessionStateItem {
                Data = new SessionStateItemCollection(),
                Flag = SessionStateActions.InitializeItem,
                LockId = 0,
                Timeout = timeout
            };

            e.SaveAll(_bucket, id, false);
        }