RedisValue: type mismatch (original) (raw)
Hello!
I'm experiencing an issue with RedisValue underlying type.
So, I'm flushing some data like the following:
RedisValue someInt = 12;
db.HashSetAsync(key, new[] {
new HashEntry("some_int", someInt)
// ...
});
The property IsInteger() prints true for someInt.
The problem occurs when attempting to read back the set:
var entry = await db.HashGetAllAsync(key);
var someInt = entry.FirstOrDefault(x => x.Name == "some_int").Value;
Here IsInteger() returns false, and I cannot sort out why.
Furthermore any cast to Int32 just fails (e.g. var x = (Int32)someInt;).
Any hint?