-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Currently a RedisValue created from an int or long will have valueBlob == IntegerSentinel, and since IntegerSentinel is an empty array, HasValue will be false.
| /// <summary> | |
| /// Indicates whether the value is either null or a zero-length value | |
| /// </summary> | |
| public bool IsNullOrEmpty | |
| { | |
| get | |
| { | |
| return valueBlob == null || (valueBlob.Length == 0 && !(valueBlob == IntegerSentinel)); | |
| } | |
| } | |
| /// <summary> | |
| /// Indicates whether the value is greater than zero-length | |
| /// </summary> | |
| public bool HasValue | |
| { | |
| get | |
| { | |
| return valueBlob != null && valueBlob.Length > 0; | |
| } | |
| } |
This might be ByDesign, but it seemed strange since it appears RedisValue instances holding an int or long still have a 'value', just stored in the valueInt64 field instead of the valueBlob one.
Metadata
Metadata
Assignees
Labels
No labels