Domain
Domain copied to clipboard
Be explicit about failing assumptions
Ran into a practical issue with a custom implementation of the IAggregateHandlerFactory. As the Instantiate method had been an explicit interface implementation, the default interface method as implemented on the IAggregateHandlerFactory was unable to use reflection to direct the call to the implementation.
The action point here is to be more explicit about assumptions, and explicitly throw an exception when those are broken. Specifically scoped to operations involving reflection.