ServiceProvider
Wisej.Services.ServiceProvider
Namespace: Wisej.Services
Assembly: Wisej.Framework (3.2.0.0)
Manages services for Wisej.NET's DI implementation.
C#
VB.NET
public class ServiceProvider : IServiceProvider
Public Class ServiceProvider
Inherits IServiceProvider
Registers a scoped service.
Parameter | Type | Description |
---|---|---|
TService | | The service to add. |
lifetime |
Throws:
Registers a scoped service.
Parameter | Type | Description |
---|---|---|
TService | | The type of the service to add. |
TImplementation | | The type of the implementation to use. |
lifetime |
Throws:
Registers a scoped service.
Parameter | Type | Description |
---|---|---|
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. | |
lifetime |
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.
Parameter | Type | Description |
---|---|---|
TService | | The service to add. |
serviceImplementation | Implementation for the TService . | |
lifetime |
Throws:
Registers a scoped service.
Parameter | Type | Description |
---|---|---|
TService | | The type of the service to add. |
implementationFactory | Method for creating the TService instance. | |
lifetime |
Throws:
Returns the requested service.
Parameter | Type | Description |
---|---|---|
T | | Type of the service to retrieve. |
Returns the requested service.
Parameter | Type | Description |
---|---|---|
serviceType | Type of the service to add. |
Throws:
Injects the services into the properties marked with the InjectAttribute attributed on the specified target object.
Parameter | Type | Description |
---|---|---|
target | Target object to inject dependencies into. |
Throws:
Removes the specified service type from the service container.
Parameter | Type | Description |
---|---|---|
serviceType | Type of the service to remove. |
Throws:
Last modified 30d ago