Microsoft.Extensions.DependencyInjection: Add a name to IServiceProvider to make them easier to track in complex projects #50638
Unanswered
VWilcox2000
asked this question in
Ideas
Replies: 1 comment 2 replies
-
I'm not opposed to this as an option on the service provider options on the default container implementation. How many DI container instances do you have and how you expect to use it? Is it purely during debugging or in memory dumps (or both?). Also this doesn't apply to scopes |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In large projects, particularly with hosted services with their own dependency pipelines, it can sometimes be challenging going back to older code to determine which IServiceProvider is in use for that piece of code. If there was an optional description available for IServiceCollection's extension BuildServiceProvider with say BuildServiceProvider("WebService Dependencies"), this would allow a developer to break-point any piece of code, and quickly inspect the name of its IServiceProvider to identify which service pipeline it is connected to.
Beta Was this translation helpful? Give feedback.
All reactions