ServiceProvider
Wisej.Services.ServiceProvider
Last updated
Was this helpful?
Wisej.Services.ServiceProvider
Last updated
Was this helpful?
Namespace: Wisej.Services
Assembly: Wisej.Framework (3.5.0.0)
Manages services for Wisej.NET's DI implementation.
Registers a scoped service.
TService
The service to add.
Throws:
A service of type TService is already registered.
Registers a scoped service. Since 3.5.4
serviceType
The type of the service to add.
Throws:
Registers a scoped service.
TService
The type of the service to add.
TImplementation
The type of the implementation to use.
Throws:
Registers a scoped service. Since 3.5.4
serviceType
The type of the service to add.
implementationType
The type of the implementation to use.
Throws:
Registers a scoped service.
TService
The type of the service to add.
implementationTypeName
The name of the type of the implementation; can be a fully qualified assembly + type name.
Using this overload allows the application to register a service implementation that is loaded dynamically when requested. If implementationTypeName is a fully qualified type name, including the assembly name, the assembly and type are loaded on demand. Throws:
Registers a scoped service. Since 3.5.4
serviceType
The type of the service to add.
implementationTypeName
The name of the type of the implementation; can be a fully qualified assembly + type name.
Using this overload allows the application to register a service implementation that is loaded dynamically when requested. If implementationTypeName is a fully qualified type name, including the assembly name, the assembly and type are loaded on demand. Throws:
Registers a scoped service.
TService
The service to add.
serviceImplementation
Implementation for the TService .
Throws:
Registers a scoped service. Since 3.5.4
serviceType
The service to add.
serviceImplementation
Implementation for the serviceType .
Throws:
Registers a scoped service.
TService
The type of the service to add.
implementationFactory
Method for creating the TService instance.
Throws:
Registers a scoped service. Since 3.5.4
serviceType
The type of the service to add.
implementationFactory
Method for creating the serviceType instance.
Throws:
Returns the requested service.
T
Type of the service to retrieve.
Returns the requested service.
serviceType
Type of the service to add.
Throws:
target
Target object to inject dependencies into.
Throws:
Removes the specified service type from the service container.
serviceType
Type of the service to remove.
Throws:
lifetime
Scope of the service. Default is .
lifetime
Scope of the service. Default is .
serviceType is null or empty.
A service of type serviceType is already registered.
lifetime
Scope of the service. Default is .
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
serviceType is null or empty.
implementationType is null or empty.
A service of type serviceType is already registered.
lifetime
Scope of the service. Default is .
implementationTypeName is null or empty.
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
serviceType is null or empty.
implementationTypeName is null or empty.
A service of type serviceType is already registered.
lifetime
Scope of the service. Default is .
serviceImplementation is null.
serviceImplementation cannot be assigned to TService .
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
serviceType is null.
serviceImplementation is null.
serviceImplementation cannot be assigned to serviceType .
A service of type serviceType is already registered.
lifetime
Scope of the service. Default is .
implementationFactory is null.
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
serviceType is null.
implementationFactory is null.
A service of type serviceType is already registered.
Returns: . An instance of T or null if the service is not found.
Returns: . An instance of serviceType or null if the service is not found.
serviceType is null.
Injects the services into the properties marked with the attributed on the specified target object.
target is null.
serviceType is null.