Skip to content

How would you use Autofac for the DI? #68

Answered by daveaglick
dmoonfire asked this question in Q&A
Discussion options

You must be logged in to vote

Great question! The Statiq internals are (mostly) designed around the Microsoft.Extensions.DependencyInjection abstraction layer and don't do anything very exotic beyond lifetime management. There's a few places like the Razor module where the container is cracked open a bit and the service descriptors are messed with, but even that should be okay since it's an abstraction over the container implementation (I.e. Autofac should be providing implementations of all the service descriptor bits).

I got curious and did a search for everywhere an actual Microsoft.Extensions.DependencyInjection.ServiceCollection implementation is instantiated and was happy to see past @daveaglick had already thro…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dmoonfire
Comment options

Answer selected by dmoonfire
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