Domain icon indicating copy to clipboard operation
Domain copied to clipboard

Be explicit about failing assumptions

Open corstian opened this issue 2 years ago • 0 comments

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.

corstian avatar Dec 13 '23 11:12 corstian