Esempio n. 1
0
 public void Remove(string key)
 {
     key = GXUtil.NormalizeKey(key);
     GXLogging.Debug(log, "Remove key: " + key);
     if (_httpSession != null)
     {
         GXLogging.Debug(log, "Remove SessionId : " + _httpSession.SessionID);
         _httpSession.Remove(key);
     }
 }
Esempio n. 2
0
 public void SetObject(string key, object val)
 {
     key = GXUtil.NormalizeKey(key);
     GXLogging.Debug(log, "Set Key" + key + "=" + val);
     if (_httpSession != null)
     {
         GXLogging.Debug(log, "SetObject SessionId : " + _httpSession.SessionID);
         _httpSession[key] = val;
     }
 }
Esempio n. 3
0
 public object GetObject(string key)
 {
     key = GXUtil.NormalizeKey(key);
     if (_httpSession != null)
     {
         GXLogging.Debug(log, "GetObject SessionId : " + _httpSession.SessionID);
         if (_httpSession[key] == null)
         {
             return(null);
         }
         return(_httpSession[key]);
     }
     return(null);
 }
Esempio n. 4
0
        public void Set <T>(string key, T val) where T : class
        {
            key = GXUtil.NormalizeKey(key);
            GXLogging.Debug(log, "Set Key" + key + "=" + val);
            if (_httpSession != null)
            {
                GXLogging.Debug(log, "SetObject SessionId : " + _httpSession.SessionID);
#if NETCORE
                _httpSession[key] = JSONHelper.Serialize <T>(val);
#else
                _httpSession[key] = val;
#endif
            }
        }
Esempio n. 5
0
        public T Get <T>(string key) where T : class
        {
            key = GXUtil.NormalizeKey(key);
            if (_httpSession != null)
            {
                GXLogging.Debug(log, "GetObject SessionId : " + _httpSession.SessionID);
                if (_httpSession[key] == null)
                {
                    return(null);
                }
#if NETCORE
                return(JSONHelper.DeserializeNullDefaultValue <T>(_httpSession[key]));
#else
                return((T)_httpSession[key]);
#endif
            }
            return(null);
        }
Esempio n. 6
0
 public string Get(string key)
 {
     key = GXUtil.NormalizeKey(key);
     if (_httpSession != null)
     {
         GXLogging.Debug(log, "GetObject SessionId : " + _httpSession.SessionID);
         if (_httpSession[key] == null)
         {
             GXLogging.Debug(log, "Get key: " + key + " is Empty");
             return(string.Empty);
         }
         else
         {
             object value = _httpSession[key];
             GXLogging.Debug(log, "Get key: " + key + "=" + value.ToString());
             return(value.ToString());
         }
     }
     return(string.Empty);
 }
Esempio n. 7
0
 public void Remove(string key)
 {
     key = GXUtil.NormalizeKey(key);
     RemoveHashValue(key);
 }
Esempio n. 8
0
 public Object GetObject(string key)
 {
     key = GXUtil.NormalizeKey(key);
     return(GetHashValueObj(key));
 }
Esempio n. 9
0
 public string Get(string key)
 {
     key = GXUtil.NormalizeKey(key);
     return(GetHashValue(key));
 }
Esempio n. 10
0
 public void SetObject(string key, Object val)
 {
     key = GXUtil.NormalizeKey(key);
     PutHashValue(key, val);
 }
Esempio n. 11
0
 public T Get <T>(string key) where T : class
 {
     key = GXUtil.NormalizeKey(key);
     return((T)GetHashValueObj(key));
 }
Esempio n. 12
0
 public void Set <T>(string key, T val) where T : class
 {
     key = GXUtil.NormalizeKey(key);
     PutHashValue(key, val);
 }