Tokens should implement IComparable and IEquatable
Closed this issue · 1 comments
mthalman commented
This will make it more useful for comparisons and dictionary lookups.
mthalman commented
Given that tokens are mutable, it is not recommended to override GetHashCode
. That prevents the dictionary lookup scenario from being a target. Instead, if the consumer knows what they're doing and knows that the token will not change, they can easily implement a simple IEqualityComparer
that could be used to provide dictionary lookup by value.
The comparison scenario isn't very compelling. Closing for now.