Key Scenarios
Retired Content |
---|
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The latest Unity Application Block information can be found at the Unity Application Block site. |
This topic describes common situations developers must address when using dependency injection mechanisms in their applications. Each scenario explains the task, describes a real-world situation where such a task might arise, and includes code demonstrating how to use the Unity Application Block to complete the task. The scenarios are as follows:
- Setting Up the Unity Container
- Resolving an Object by Type
- Resolving an Object by Type and Registration Name
- Resolving All Objects of a Particular Type
- Using BuildUp to Wire Up Objects Not Created by the Container
- Annotating Objects for Constructor Injection
- Annotating Objects for Property (Setter) Injection
- Annotating Objects for Method Call Injection
- Configuring and Using Matching Rules