Esempio n. 1
0
 public T Get <T>(string key)
 {
     V_0 = DistributedCacheExtensions.GetString(this._cache, key);
     if (String.IsNullOrEmpty(V_0))
     {
         V_1 = default(T);
         return(V_1);
     }
     return(JsonConvert.DeserializeObject <T>(V_0, this._jsonSettings));
 }
Esempio n. 2
0
 public static string GetString(this IDistributedCache cache, string key)
 {
     return(DistributedCacheExtensions.GetString(cache, key));
 }
Esempio n. 3
0
 public void Set <T>(string key, T value)
 {
     DistributedCacheExtensions.SetString(this._cache, key, JsonConvert.SerializeObject(value, this._jsonSettings));
     return;
 }