-
Notifications
You must be signed in to change notification settings - Fork 931
Description
Checklist
- I have verified this is the correct repository for opening this issue.
- I have verified no other issues exist related to my request.
Is Your Feature Request Related To A Problem? Please describe.
When attempting to acquire commands to re-use in the application, we need to resolve all commands and use reflection to iterate through them to be able to find the command that we are interested in.
Describe The Solution. Why is it needed?
We need to determine what simplify in this context means.
We need to either extract the logic of finding the commands to its own extension method (possibly an extension on the IoC container) so that we do not have mixed logic between different places, and to ensure that we are consistent in how it is used.
Alternatively, we can look into if there are better ways of trying to find the command classes that we want, to try to avoid using reflections. One idea here is to maybe register each command class directly, and then have it added to an entire collection if we need to.
This could potentially be solved by making use of keyed names when registering as well.
User Story
As a maintainer of the application, or as an extension maintainer that needs to call other commands we need to currently duplicate the behaviour, and use reflection.
This is error prone, and can lead to runtime errors if done incorrectly.
I want to have the ability to re-use the logic of resolving commands in a standard, tested and simplified matter to avoid runtime errors from happening.
Additional Context
No response
Acceptance Criteria
- Resolving commands has been simplified and/or standardized.
- No behaviour runtime changes introduced (Run all unit/integration and e2e tests).
Related Issues
No response