Show / Hide Table of Contents

Class UnityContainerExtensions

Extension method for easy registration of Microsoft.Extensions.DependencyInjection.IServiceCollection with the container.

Inheritance
Object
UnityContainerExtensions
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
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.

Back to top Generated by DocFX