4 ms·
Errr, you setup up the container in one place, normally main or somewhere at the start. Very few containers are xml only these days. There's normally section a
by UK-AL 12y ago
Errr, you setup up the container in one place, normally main or somewhere at the start. Very few containers are xml only these days.
There's normally section at the start like
container.RegisterType<IMessageQueue, MSMQMessageQueue>
container.RegisterType<IGeocoder, GoogleGeocoder>
Modern containers don't even use annotations, they just scan the constructor parameters.
- moomin 12y agoYes, but they still magically figure out what goes into what. In the case that you've got a relatively flat structure (services injecting into lots of handlers) this is convenient. When you're building a complex tree, it reduces your understanding of the structure of your code.