Beispiel #1
0
 internal void Flush()
 {
     foreach (WSSessionCache RCache in SessionsCache)
     {
         if (WSSessionCache.IsValid(RCache))
         {
             RCache.Flush();
         }
     }
 }
Beispiel #2
0
        internal bool GetContext(Type _ContextType, WSRequestID _RequestID, out WSDataContext _context)
        {
            _context = null;
            try
            {
                WSSessionCache SessionCache = SessionsCache.FirstOrDefault(x => x.SessionID.Equals(_RequestID.SessionID));
                if (SessionCache == null)
                {
                    SessionCache = new WSSessionCache(_RequestID.SessionID);
                    SessionsCache.Add(SessionCache);
                }

                return(SessionCache.GetContext(_ContextType, _RequestID, out _context));
            }
            catch (Exception) { return(false); }
        }
 internal static bool IsValid(WSSessionCache sessionCache)
 {
     return(sessionCache != null && sessionCache.Items != null);
 }