Open KSemenenko opened 2 years ago
Tagging subscribers to this area: @dotnet/area-extensions-dependencyinjection See info in area-owners.md if you want to be subscribed.
Author: | KSemenenko |
---|---|
Assignees: | - |
Labels: | `api-suggestion`, `untriaged`, `area-Extensions-DependencyInjection` |
Milestone: | - |
If it's a good idea, I'm happy to implement it.
I think lifetime should be the same, as you mention it’s for testing
Background and motivation
For replacement implementation in TestHost I should do like this:
Or like this
So I thought, why not use the Replace method
but found that it didn't exist.
API Proposal
API Usage
Alternative Designs
No response
Risks
The Replace method already exists, it's a new API, so I don't see any serious risks.