Class ConfigureDependenciesExtensions
Extension methods for adding services to an IConfigureDependencies.
Inherited Members
Namespace: IRM.Dependencies
Assembly: IRM.dll
Syntax
public static class ConfigureDependenciesExtensions
Methods
AddRequiredIrmServices(IConfigureDependencies, ICurrentPrincipalAccessor)
Adds multi-tenant core services that many other depend on.
Declaration
public static IConfigureDependencies AddRequiredIrmServices(this IConfigureDependencies configuration, ICurrentPrincipalAccessor principalAccessor)
Parameters
IConfigureDependencies
configuration
The configuration instance. |
ICurrentPrincipalAccessor
principalAccessor
The ICurrentPrincipalAccessor to use. |
Returns
IConfigureDependencies
The configuration instance. |
AddRequiredIrmServices(IConfigureDependencies, ICurrentPrincipalAccessor, Guid)
Adds single-tenant core services that many other depend on.
Declaration
public static IConfigureDependencies AddRequiredIrmServices(this IConfigureDependencies configuration, ICurrentPrincipalAccessor principalAccessor, Guid singleTenantId)
Parameters
IConfigureDependencies
configuration
The configuration instance. |
ICurrentPrincipalAccessor
principalAccessor
The ICurrentPrincipalAccessor to use. |
System.Guid
singleTenantId
The unique identity of the single tenant (in a single tenant system). |
Returns
IConfigureDependencies
The configuration instance. |
AddRequiredIrmServices<TPrincipalAccessor>(IConfigureDependencies)
Adds multi-tenant core services that many other depend on.
Declaration
public static IConfigureDependencies AddRequiredIrmServices<TPrincipalAccessor>(this IConfigureDependencies configuration)
where TPrincipalAccessor : class, ICurrentPrincipalAccessor
Parameters
IConfigureDependencies
configuration
The configuration instance. |
Returns
IConfigureDependencies
The configuration instance. |
Type Parameters
TPrincipalAccessor
The type of principal accessor that should be used. |
AddRequiredIrmServices<TPrincipalAccessor>(IConfigureDependencies, Guid)
Adds single-tenant core services that many other depend on.
Declaration
public static IConfigureDependencies AddRequiredIrmServices<TPrincipalAccessor>(this IConfigureDependencies configuration, Guid singleTenantId)
where TPrincipalAccessor : class, ICurrentPrincipalAccessor
Parameters
IConfigureDependencies
configuration
The configuration instance. |
System.Guid
singleTenantId
The unique identity of the single tenant (in a single tenant system). |
Returns
IConfigureDependencies
The configuration instance. |
Type Parameters
TPrincipalAccessor
The type of principal accessor that should be used. |
AddScoped(IConfigureDependencies, Type)
Adds a scoped service of the type specified in serviceType
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddScoped(this IConfigureDependencies container, Type serviceType)
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
System.Type
serviceType
The type of the service to register and the implementation to use. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
AddScoped<TService>(IConfigureDependencies)
Adds a scoped service of the type specified in TService
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddScoped<TService>(this IConfigureDependencies container)
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
Type Parameters
TService
The type of the service to add. |
AddScoped<TService, TImplementation>(IConfigureDependencies)
Adds a scoped service of the type specified in TService
with an implementation type specified in TImplementation
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddScoped<TService, TImplementation>(this IConfigureDependencies container)
where TImplementation : TService
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
Type Parameters
TService
The type of the service to add. |
TImplementation
The type of the implementation to use. |
AddSingleton(IConfigureDependencies, Type)
Adds a singleton service of the type specified in serviceType
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddSingleton(this IConfigureDependencies container, Type serviceType)
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
System.Type
serviceType
The type of the service to register and the implementation to use. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
AddSingleton<TService>(IConfigureDependencies)
Adds a singleton service of the type specified in TService
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddSingleton<TService>(this IConfigureDependencies container)
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
Type Parameters
TService
The type of the service to add. |
AddSingleton<TService>(IConfigureDependencies, TService)
Adds a singleton service of the type specified in TService
with an instance specified in implementationInstance
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddSingleton<TService>(this IConfigureDependencies container, TService implementationInstance)
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
TService
implementationInstance
The instance of the service. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
Type Parameters
TService
The type of the service to add. |
AddSingleton<TService, TImplementation>(IConfigureDependencies)
Adds a singleton service of the type specified in TService
with an implementation type specified in TImplementation
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddSingleton<TService, TImplementation>(this IConfigureDependencies container)
where TImplementation : TService
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
Type Parameters
TService
The type of the service to add. |
TImplementation
The type of the implementation to use. |
AddTransient(IConfigureDependencies, Type)
Adds a transient service of the type specified in serviceType
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddTransient(this IConfigureDependencies container, Type serviceType)
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
System.Type
serviceType
The type of the service to register and the implementation to use. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
AddTransient<TService>(IConfigureDependencies)
Adds a transient service of the type specified in TService
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddTransient<TService>(this IConfigureDependencies container)
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
Type Parameters
TService
The type of the service to add. |
AddTransient<TService, TImplementation>(IConfigureDependencies)
Adds a transient service of the type specified in TService
with an implementation type specified in TImplementation
to the specified IConfigureDependencies.
Declaration
public static IConfigureDependencies AddTransient<TService, TImplementation>(this IConfigureDependencies container)
where TImplementation : TService
Parameters
IConfigureDependencies
container
The IConfigureDependencies to add the service to. |
Returns
IConfigureDependencies
A reference to this instance after the operation has completed. |
Type Parameters
TService
The type of the service to add. |
TImplementation
The type of the implementation to use. |