Class ContainerBuilderExtensions
ContainerBuilder extension methods.
Inheritance
System.Object
ContainerBuilderExtensions
Namespace: MAT.Atlas.Api.Core.Autofac
Assembly: MAT.Atlas.Api.Core.dll
Syntax
public static class ContainerBuilderExtensions : Object
Methods
RegisterSingleInstance<TInstance>(ContainerBuilder)
Registers a single instance.
Declaration
public static void RegisterSingleInstance<TInstance>(this ContainerBuilder containerBuilder)
Parameters
Type | Name | Description |
---|---|---|
Autofac.ContainerBuilder | containerBuilder | The container builder. |
Type Parameters
Name | Description |
---|---|
TInstance | The type of the instance. |
RegisterSingleInstance<TInstance, TInterface>(ContainerBuilder)
Registers a single instance.
Declaration
public static void RegisterSingleInstance<TInstance, TInterface>(this ContainerBuilder containerBuilder)
where TInstance : TInterface
Parameters
Type | Name | Description |
---|---|---|
Autofac.ContainerBuilder | containerBuilder | The container builder. |
Type Parameters
Name | Description |
---|---|
TInstance | The type of the instance. |
TInterface | The type of the interface. |
RegisterType<TInstance, TInterface>(ContainerBuilder)
Registers a type.
Declaration
public static void RegisterType<TInstance, TInterface>(this ContainerBuilder containerBuilder)
where TInstance : TInterface
Parameters
Type | Name | Description |
---|---|---|
Autofac.ContainerBuilder | containerBuilder | The container builder. |
Type Parameters
Name | Description |
---|---|
TInstance | The type of the instance. |
TInterface | The type of the interface. |
RegisterTypeAsImplementedInterfaces<TInstance, TInterface>(ContainerBuilder)
Registers the type as implemented interfaces.
Declaration
public static void RegisterTypeAsImplementedInterfaces<TInstance, TInterface>(this ContainerBuilder containerBuilder)
where TInstance : TInterface
Parameters
Type | Name | Description |
---|---|---|
Autofac.ContainerBuilder | containerBuilder | The container builder. |
Type Parameters
Name | Description |
---|---|
TInstance | The type of the instance. |
TInterface | The type of the interface. |