In my first question
Find the correct root directory for the .NET library
helped clarify the issue of dependency injection. Stephen's comprehensive answer says (in a few words, if possible) that a reusable library is a special case, and here we can use poor-man-injection (see answer for completeness).
As you study AutoFixture source code, you may notice that the main assembly uses DI everywhere, regardless of the container; which is well described in Mark Seemann .
Question: can someone introduce a template (or good practice) to abstract the root of the composition without using a container?
Additional notes (optional):
Backup in AutoFixture, where the root of the composition is found in designers of the Fixture type; I think the *Relays class is used to group instances in a similar way, some DI libraries have a module concept. It is interesting to note that there is a type called BehaviourRoot , which is located at the top of the graph (is this the kind of abstraction I'm looking for?).
source share