In simple terms and/or in high-level pseudo-code, how does a DI container work and how is it used?
You configure a DI container so it knows about your interfaces and types - how each interface maps to a type.
When you call Resolve
on it, it looks at the mapping and returns the mapped object you have requested.
Some DI containers use conventions over configuration, where for example, if you define an interface ISomething
, it will look for a concrete Something
type to instantiate and return.