You are previewing Dependency Injection in .NET.

Dependency Injection in .NET

Cover of Dependency Injection in .NET by Mark Seemann Published by Manning Publications
O'Reilly logo

Chapter 3. DI Containers

Menu

  • XML configuration
  • Code as configuration
  • AUTO-REGISTRATION
  • COMPOSITION ROOT
  • REGISTER RESOLVE RELEASE

When I was a kid, my mother and I would occasionally make ice cream. This didn’t happen too often, because it required a lot of work and it was hard to get right. In case you’ve never tried making ice cream, figure 3.1 illustrates the process.

Figure 3.1. Making ice cream is an arduous process, with plenty of opportunities for error.

Real ice cream is based on a crème anglaise, which is a light custard made from sugar, egg yolks, and milk or cream. If heated too much, this mixture will curdle. Even if you manage ...

The best content for your career. Discover unlimited learning on demand for around $1/day.