Unity Container

Unity Container is an IoC (Inversion of Control) container developed by Microsoft for .NET Framework and .NET Core. It is a lightweight and extensible container that provides a range of features for managing dependencies in an application.

The Unity Container supports three types of dependency injection: constructor injection, property injection, and method injection. Constructor injection is the most commonly used form of dependency injection, where the dependencies of an object are passed in as parameters to its constructor. Property injection and method injection are used less frequently but can be useful in certain scenarios.

Unity Container also provides support for object lifetime management through different object lifetime management policies such as TransientLifetimeManager, PerThreadLifetimeManager, SingletonLifetimeManager, etc. These policies define how and when objects are created and disposed of.

Unity Container provides extensibility through the use of extension points, which allow developers to extend or customize the behavior of the container. For example, developers can write custom lifetime managers or injection members to define their own object lifetime management or injection strategies.

Unity Container also supports interception, which allows developers to intercept method calls on objects created by the container. This can be useful for adding cross-cutting concerns such as logging, caching, or security to an application.

In summary, Unity Container is a powerful and flexible IoC container for .NET applications, providing a range of features for managing dependencies and object lifetime, and supporting extension and customization through extension points. It is widely used in .NET development and is well-documented with many resources available online.