Class UnityContainerExtensions
Extension method for easy registration of Microsoft.Extensions.DependencyInjection.IServiceCollection with the container.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Namespace: IRM.Unity.Microsoft.DependencyInjection
Assembly: IRM.Unity.Microsoft.DependencyInjection.dll
Syntax
public static class UnityContainerExtensions
Methods
AddServices(IUnityContainer, IServiceCollection)
Adds all services registered with the Microsoft.Extensions.DependencyInjection.IServiceCollection to the unity container.
Declaration
public static IUnityContainer AddServices(this IUnityContainer container, IServiceCollection services)
Parameters
Unity.IUnityContainer
container
The Unity.IUnityContainer. |
Microsoft.Extensions.DependencyInjection.IServiceCollection
services
The Microsoft.Extensions.DependencyInjection.IServiceCollection registrations. |
Returns
Unity.IUnityContainer
Returns the container. |
Remarks
This method is only supposed to be called once. It won't work for multiple Unity.IUnityContainer instances.