public T Deserialize <T>(RedisValue value) { if (IsNotBaseType <T>()) { return(JsonConvert.DeserializeObject <T>(value)); } return(value.To <T>()); }
public void ConvertExtentionMethod() { int origin = 0xFF; RedisValue redisVal = origin.ToRedisValue(); int converted = redisVal.To <int>(); Assert.IsFalse(redisVal.IsNullOrEmpty); Assert.AreEqual(origin, converted); }