Open ZFi88 opened 4 years ago
Hi @ZFi88,
There are some good ideas in there, and thanks for asking before you did a pull request. Many people just do a pull and I have to sort it out afterwards, which is a pain
I like what you propose, but suggestion the following changes:
Please add unit tests and comments on your attributes. I will check it out and release it and update the documentation. I am busy so there may be a delay.
About your changes:
On item 1, my experience of using AutoRegisterDi
is that you want it to register everything, but there may be one or two you don't want to register. Therefore a [DoNotAutoRegister] is much more useful than a [Service] attribute.
AutoRegisterDi
is about simple registering with DI so the attributes should be for the unusual situations, not the normal situations.
ok, i will try create merge request in the coming days
I would also like to suggest the addition of automatic 'Keyed' registration and appropriate attributes.
Hi @Alan-Burgess,
You might not know, but I have dementia - see this section, which means I rarely change any of my libraries that. Sorry to say no.
Very sorry to hear that. 😞
Hello! What do you think about using some custom attributes for marking classes, which needs to be registred in container, maybe [Service]? Also we can using attributes for marking classes life time scope([Transient], [Scoped], [Singleton])). By that change we can register dependencies in one call... I can create pull request for you.