Beispiel #1
0
 public void SetSession(string key, object value)
 {
     if (string.IsNullOrWhiteSpace(key))
     {
         throw new Exception("Key is Null or Epmty");
     }
     key = CreatSessionCookie() + "_" + key;
     CacheAction.SetCache(key, value);
 }
Beispiel #2
0
 public object this[string key]
 {
     get
     {
         key = CreatSessionCookie() + "_" + key;
         return(CacheAction.GetCache(key));
     }
     set
     {
         if (value == null)
         {
             CacheAction.RemoveCache(key);
         }
         else
         {
             SetSession(key, value);
         }
     }
 }
Beispiel #3
0
        public void RemoveSession(string key)
        {
            key = CreatSessionCookie() + "_" + key;

            CacheAction.RemoveCache(key);
        }