BHoM_Engine: `TryGetValue(this FragmentSet fragmentSet, Type fragmentType, out IFragment fragment)` should look for matches for derived Fragment types
Open
type:bug
- Dominant language
- C#
- Stars
- 30
- Forks
- 13
- Avg merge
- 7d 10h
- Merged PRs (30d)
- 5
Description
#### Description:
Currently, `TryGetValue(this FragmentSet fragmentSet, Type fragmentType, out IFragment fragment)` only checks if exactly the specified Fragment type is found in the fragmentSet. However, a valid approach is to call it by passing in `fragmentType` something like `typeof(IPersistentId)`. In case multiple matches are found, an error should be returned. Currently, the function returns no match at all for that scenario, even if the FragmentSet has a Fragment that inherit from `IPersistentId`, which is not correct.
Contributor guide
Assessment
This issue has not been assessed yet.