Esempio n. 1
0
        /// <summary>
        /// Removes and disposes the current <c>AssembledDocsCache</c>, if there is one.
        /// </summary>
        /// <param name="session"></param>
        public static void RetireAssembledDocsCache(System.Web.SessionState.HttpSessionState session)
        {
            AssembledDocsCache cache = (AssembledDocsCache)session["AssembledDocsCache"];

            if (cache != null)
            {
                session["AssembledDocsCache"] = null;
                cache.Dispose();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Returns the <c>AssembledDocsCache</c> for the user session.
 /// </summary>
 /// <param name="session">The user session</param>
 /// <returns></returns>
 public static AssembledDocsCache GetAssembledDocsCache(System.Web.SessionState.HttpSessionState session)
 {
     AssembledDocsCache cache = (AssembledDocsCache)session["AssembledDocsCache"];
     if (cache == null)
     {
         cache = new AssembledDocsCache(Settings.DocPath);
         session["AssembledDocsCache"] = cache;
     }
     return cache;
 }
Esempio n. 3
0
        /// <summary>
        /// Returns the <c>AssembledDocsCache</c> for the user session.
        /// </summary>
        /// <param name="session">The user session</param>
        /// <returns></returns>
        public static AssembledDocsCache GetAssembledDocsCache(System.Web.SessionState.HttpSessionState session)
        {
            AssembledDocsCache cache = (AssembledDocsCache)session["AssembledDocsCache"];

            if (cache == null)
            {
                cache = new AssembledDocsCache(Settings.DocPath);
                session["AssembledDocsCache"] = cache;
            }
            return(cache);
        }