Q: Getting multiple service instances for service implementations #113986
Unanswered
mwpowellhtx
asked this question in
Q&A
Replies: 2 comments 2 replies
-
As I see in the documentation there is no word for any guarantee. But I was wondering why you may need that. If you give me a clue for your use case I may help with that as I think that the order of service registrations should not be important. |
Beta Was this translation helpful? Give feedback.
1 reply
-
As stated in https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection#service-registration-methods:
But personally, I would suggest using keyed services if you can. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, consider the following:
It seems as though based on the console output, that services are reported in registration order.
My question is mainly, is that order guaranteed? Are there any cases in which that order might not be so guaranteed?
Thanks...
Beta Was this translation helpful? Give feedback.
All reactions