Member group
AddScoped
Declaring type: ServiceCollectionExtensions
Module: Neo.DependencyInjection
Assembly: Neo.DependencyInjection.Abstractions.dll
Overloads / Variants
AddScoped
func AddScoped<TService, TImplementation>() -> Result<void, ServiceError>
Extension from ServiceCollectionExtensions.AddScoped
Registers a scoped service; invalid types or results are reported as ServiceError.
Parameters
| Name | Type | Description |
|---|---|---|
self |
ServiceCollection |
Return value
Result<void, ServiceError>
AddScoped
func AddScoped<TService>(factory: (ServiceProvider) -> Result<TService, ServiceError>) -> Result<void, ServiceError>
Extension from ServiceCollectionExtensions.AddScoped
Registers a scoped service; invalid types or results are reported as ServiceError.
Parameters
| Name | Type | Description |
|---|---|---|
self |
ServiceCollection | |
factory |
Function |
Return value
Result<void, ServiceError>
AddScoped
func AddScoped<TService>() -> Result<void, ServiceError>
Extension from ServiceCollectionExtensions.AddScoped
Registers a scoped service; invalid types or results are reported as ServiceError.
Parameters
| Name | Type | Description |
|---|---|---|
self |
ServiceCollection |
Return value
Result<void, ServiceError>