
Integration with the Unity Application Block
In this release of Enterprise Library, you can use the Unity Application Block (Unity) to intercept Enterprise Library objects and execute code before or after the body of a function or a method is executed and you can generate instances of Enterprise Library objects and inject them into other objects.
Enterprise Library contains a set of classes that allow you to obtain instances of objects such as a SqlDatabase or a CacheManager, defined in the Enterprise Library configuration, from the Unity container. In addition, new "injection-friendly" façades for some of the Enterprise Library objects replace static façades, which cannot be used with injection. These features use the dependency injection capabilities of Unity and can considerably simplify your code.
Unity provides interceptors that will, when configured in the container, allow you to intercept method calls and attach call handlers to the intercepted methods. For more information on interception see Using Interception with Unity.
For more information about the integration of Unity and Enterprise Library, see Creating Objects Using the Unity Application Block.