You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'feature/GetValue-nomenclature' into develop
Our naming conventions were inconsistent across classes, with a mix of `GetValue()` and `GetTopic()`—or, related, e.g. `RemoveTopic()`, `ClearTopics()`. Historically, this is due to these collections originally being purpose built for e.g. topics, and then some being generalized to e.g., `TrackedRecordCollection<>`, which isn't specific to topics. That said, `GetValue()` is more consistent with e.g., `KeyedCollection<>`'s similar `TryGetValue()`, and offers consistency across interfaces and predictability in terms of nomenclature.
It is true that in changing this we're losing clarity of the type of value being retrieved, but this is almost always clear in context. E.g., `topic.Children.GetValue()`, `topic.Relationships.GetValues()`, and topic.Attributes.GetValue()` come with contextual clues.
This change includes renaming:
- `(ReadOnly)TopicMultiMap.GetValues()` to `GetTopics()` (ad3e5dd)
- `ReadOnlyTopicMultipMap.GetAllTopics()` to `GetAllValues()` (2f01591)
- `TopicRelationshipMultiMap.RemoveTopic()` to `Remove()` (9f65271)
- `TopicRelationshipMultiMap.SetTopic()` to `SetValue()` (b99a04e)
- `(ReadOnly)KeyedTopicCollection.GetTopic()` to `GetValue()` (6674c7d)
These are all breaking changes that interfere with the standard way of engaging with the OnTopic library via well-established interfaces. As a result, I've maintained deprecated versions of the original interfaces so that implementors receive clear guidance on how to mitigate the errors.
0 commit comments