Skip to content

How to replace service provider with Autofac #213

Answered by egil
otabota asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @otabota

No, it is not currently possible to replace the internal TestServiceProvider. If you have a suggestion for how to make that possible am all ears and do welcome PRs.

It should not be too hard to do though, since all the types that needs services just expect a IServiceCollection. My reason for creating the TestServiceProvider type was to be able to have single property exposed named Services, that users could use to both register services before renderinger components, and also use to get services in their tests, if needed.

Hope this helps.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by egil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #213 on September 15, 2020 15:49.