ServiceProvider
Wisej.Services.ServiceProvider
Last updated
Was this helpful?
Wisej.Services.ServiceProvider
Last updated
Was this helpful?
Namespace: Wisej.Services
Assembly: Wisej.Framework (4.0.0.0)
Manages services for Wisej.NET's DI implementation.
Registers or replaces a scoped service. Since 4.0.0
TService
The service to add.
Returns: .
Throws:
A service of type TService is already registered.
Registers or replaces a scoped service. Since 4.0.0
serviceType
The type of the service to add.
This non-generic method supports the registration of generic services:
Throws:
Registers or replaces a scoped service. Since 4.0.0
TService
The type of the service to add.
TImplementation
The type of the implementation to use.
Throws:
Registers a scoped service. Since 4.0.0
serviceType
The type of the service to add.
implementationType
The type of the implementation to use.
This non-generic method supports the registration of generic services:
Throws:
Registers or replaces a scoped service. Since 4.0.0
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 or replaces a scoped service. Since 4.0.0
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. This non-generic method supports the registration of generic services:
Throws:
Registers or replaces a scoped service. Since 4.0.0
TService
The service to add.
serviceImplementation
Implementation for the TService .
Throws:
Registers or replaces a scoped service. Since 4.0.0
serviceType
The service to add.
serviceImplementation
Implementation for the serviceType .
This non-generic method supports the registration of generic services:
Throws:
Registers or replaces a scoped service. Since 4.0.0
TService
The type of the service to add.
implementationFactory
Method for creating the TService instance.
Throws:
Registers or replaces a scoped service. Since 4.0.0
serviceType
The type of the service to add.
implementationFactory
Method for creating the serviceType instance.
This non-generic method supports the registration of generic services:
Throws:
Registers a scoped service.
TService
The service to add.
Throws:
Registers a scoped service. Since 3.5.4
serviceType
The type of the service to add.
This non-generic method supports the registration of generic services:
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.
This non-generic method supports the registration of generic services:
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. This non-generic method supports the registration of generic services:
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 .
This non-generic method supports the registration of generic services:
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.
This non-generic method supports the registration of generic services:
Throws:
Returns the requested service.
T
Type of the service to retrieve.
Returns the requested service.
serviceType
Type of the service to add.
Throws:
Checks if a service of type T is already registered. Since 3.5.12
T
Service type to check.
Checks if a service of type serviceType is already registered. Since 3.5.12
serviceType
Service type to check.
target
Target object to inject dependencies into.
Throws:
Removes the specified service type from the service container.
TService
The service to remove.
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 .
Returns: .
serviceType is null or empty.
A service of type serviceType is already registered.
lifetime
Scope of the service. Default is .
Returns: .
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
Returns: .
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 .
Returns: .
implementationTypeName is null or empty.
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
Returns: .
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 .
Returns: .
serviceImplementation is null.
serviceImplementation cannot be assigned to TService .
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
Returns: .
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 .
Returns: .
implementationFactory is null.
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
Returns: .
serviceType is null.
implementationFactory is null.
A service of type serviceType is already registered.
lifetime
Scope of the service. Default is .
Returns: .
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
Returns: .
serviceType is null or empty.
A service of type serviceType is already registered.
lifetime
Scope of the service. Default is .
Returns: .
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
Returns: .
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 .
Returns: .
implementationTypeName is null or empty.
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
Returns: .
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 .
Returns: .
serviceImplementation is null.
serviceImplementation cannot be assigned to TService .
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
Returns: .
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 .
Returns: .
implementationFactory is null.
A service of type TService is already registered.
lifetime
Scope of the service. Default is .
Returns: .
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.
Returns: . true if the service is registered.
Returns: . true if the service is registered.
Injects the services into the properties marked with the attributed on the specified target object.
target is null.
Returns: .
Returns: .
serviceType is null.