Can anyone explain why service fabric has both IReliableDictionary
and IReliableDictionary2
where IReliableDictionary
DERIVES from IReliableDictionary2
? It makes no sense and the documentation doesn't appear to explain it. Which one are you supposed to use?
IReliableDictionary2
has an additional property Count
which is persisted alongside the collection's entries. This allows quick access to the number of entries in the collection, as usually you'd have to enumerate over its entries and calculate the count.
This is not very clear from the API documentation, merely seeing "Oh this has an extra count property" does not, to me, alert that "You should use this if you need to readily access the count". Perhaps you could open an issue here explaining how it's not clear, or edit it and create a PR!