This is great stuff. Exactly what I was looking for. A couple possible improvements. If you're using Attributes (recommended) you can decorate the service (interface) rather than the implementation. This then removes the need for the naming convention (IImplementation) and the magic string in your registration reflection method. Reflection can lookup any classes that have an interface decorated with your custom attribute. At that point you have everything you need for DI registration
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is great stuff. Exactly what I was looking for. A couple possible improvements. If you're using Attributes (recommended) you can decorate the service (interface) rather than the implementation. This then removes the need for the naming convention (IImplementation) and the magic string in your registration reflection method. Reflection can lookup any classes that have an interface decorated with your custom attribute. At that point you have everything you need for DI registration