Interface IConfigureDependencies
Represents a dependency injector container that can be configured.
Namespace: IRM.Dependencies
Assembly: IRM.dll
Syntax
public interface IConfigureDependencies
Properties
Container
Gets a reference to the underlying dependency injector container.
Declaration
object Container { get; }
Property Value
Object
|
Methods
AddScoped(Type, Type)
Adds a scoped service of the type specified in serviceType
with an implementation of the type specified in implementationType
.
Declaration
IConfigureDependencies AddScoped(Type serviceType, Type implementationType)
Parameters
System.Type
serviceType
The type of the service to register. |
System.Type
implementationType
The implementation type of the service. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
AddSingleton(Type, Object)
Adds a singleton service of the type specified in serviceType
with an instance specified in implementationInstance
to the specified IConfigureDependencies.
Declaration
IConfigureDependencies AddSingleton(Type serviceType, object implementationInstance)
Parameters
System.Type
serviceType
The type of the service to register. |
Object
implementationInstance
|
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
AddSingleton(Type, Type)
Adds a singleton service of the type specified in serviceType
with an implementation of the type specified in implementationType
to the specified IConfigureDependencies.
Declaration
IConfigureDependencies AddSingleton(Type serviceType, Type implementationType)
Parameters
System.Type
serviceType
The type of the service to register. |
System.Type
implementationType
The implementation type of the service. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
AddTransient(Type, Type)
Adds a transient service of the type specified in serviceType
with an implementation of the type specified in implementationType
to the specified IConfigureDependencies.
Declaration
IConfigureDependencies AddTransient(Type serviceType, Type implementationType)
Parameters
System.Type
serviceType
The type of the service to register. |
System.Type
implementationType
The implementation type of the service. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |