Global: Should all fallback methods call run extension method?
- Dominant language
- C#
- Stars
- 30
- Forks
- 13
- Avg merge
- 7d 10h
- Merged PRs (30d)
- 5
Description
For method where we use the `as dynamic` casting approach, with an `I` method, we generally should be having a fallback method to make sure we can correctly handle types not yet implemented. see https://github.com/BHoM/BHoM_Engine/blob/master/Geometry_Engine/Query/Bounds.cs for example.
To expand on this, we could make sure to always call `RunExtensionMethod` from this fallback, as is being done in `BHoM_Engine` for the Geometry method: https://github.com/BHoM/BHoM_Engine/blob/master/BHoM_Engine/Query/Geometry.cs
This means any class that implements a base interface could have their methods residing in another toolkit/project if need be. If someone for example adds a new curve type they need in their toolkit, and add all curve methods in their own engine, this would mean all the interface methods would be able to reach those methods as well.
@adecler , can you think of any big problems with this?
@al-fisher @FraserGreenroyd @LMarkowski @alelom @epignatelli
Contributor guide
Assessment
This issue has not been assessed yet.