NewLifeX / NewLife.Redis

High performance redis client, support NETCore/. NET4. 0/. NET4. 5. It is specially optimized for big data and message queue. The average daily consumption of online single application is 10 billion. 高性能Redis客户端,支持.NETCore/.NET4.0/.NET4.5,为大数据与消息队列而特别优化,线上单应用日均100亿调用量

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RedisHash.GetAll() throws expception:" System.Exception: 已到达字符串结尾"

AlexScofield opened this issue · comments

1:
var hash = redis.GetDictionary("vm") as RedisHash<String, object>;
var idic = new VmModel { Id = Guid.NewGuid(), Name = "VM1" }.ToDictionary();
hash.HMSet(idic);
var dic = hash.GetAll(); //throw exception " System.Exception: 已到达字符串结尾".

2:
var hash=redis.GetDictionary("vm") as RedisHash<String, VmModel >;
这里的泛型参数不能是自定义的类吗,这么写hash会是null

commented

1,需要查一下日志
2,这个反序列化要指定类型