Chapter 14. Unity
Menu
- Introducing Unity
- Managing lifetime
- Working with multiple components
- Configuring difficult APIs
In the previous chapter, we looked at Autofac, which is one of the more recent DI Containers to enter the game. Another contemporary DI Container is Unity, which we’ll examine in this chapter.
Autofac can be labeled as a second-generation DI Container because it was conceived and developed directly on .NET 3.5 without any legacy baggage from earlier versions of .NET. Although Unity appeared in roughly the same time frame, it took a more conservative approach. Unity 1.0 was released in May 2008, but targeted .NET 2.0, acknowledging that many development organizations would take their time before upgrading to .NET 3.5.
Unity ...
Get Dependency Injection in .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.