BHoM_Engine: in GetAllFragments, remove the requirement that the input interface to look for is an IFragment
- Dominant language
- C#
- Stars
- 30
- Forks
- 13
- Avg merge
- 7d 10h
- Merged PRs (30d)
- 5
Description
#### Description:
The following check:
https://github.com/BHoM/BHoM_Engine/blob/a7ddf9875c6cc59455c192a41f32f9e0ebf385ec/BHoM_Engine/Query/GetAllFragments.cs#L54-L58
limits the usefulness of the method, in that the search is limited to interfaces that implement `IFragment`. It is also not useful, because the `Fragments` property only contains `IFragment`s anyway.
There are cases where we want to look for Fragments by an interface that is not implementing `IFragment` itself, for example, `IImmutable`, e.g. _find all fragments that are immutable_.
We can safely remove this check to extend the functionality of the method without incurring in any problem.
We can also avoid throwing any warning in case no result is retrieved, to avoid warning overflow. This is also consistent to how the "FindFragment" method works.
This could be done together with https://github.com/BHoM/BHoM_Engine/issues/2588.
Contributor guide
Assessment
This issue has not been assessed yet.