public T Deserialize <T>(RedisValue value)
        {
            if (IsNotBaseType <T>())
            {
                return(JsonConvert.DeserializeObject <T>(value));
            }

            return(value.To <T>());
        }
예제 #2
0
        public void ConvertExtentionMethod()
        {
            int        origin    = 0xFF;
            RedisValue redisVal  = origin.ToRedisValue();
            int        converted = redisVal.To <int>();

            Assert.IsFalse(redisVal.IsNullOrEmpty);
            Assert.AreEqual(origin, converted);
        }