Member group
Add
Declaring type: DefaultServiceCollection
Module: Neo.DependencyInjection
Assembly: Neo.DependencyInjection.dll
Source file: Services.rvn
Overloads / Variants
Add
func Add(descriptor: ServiceDescriptor) -> Result<void, ServiceError>
Source file: Services.rvn
Implements ServiceCollection.Add
Validates and retains an immutable descriptor without activating it.
Parameters
| Name | Type | Description |
|---|---|---|
descriptor |
ServiceDescriptor |
Return value
Result<void, ServiceError>
Add
func Add(service: TypeInfo, implementation: TypeInfo, lifetime: ServiceLifetime) -> Result<void, ServiceError>
Source file: Services.rvn
Implements ServiceCollection.Add
Registers an unkeyed implementation.
Parameters
| Name | Type | Description |
|---|---|---|
service |
TypeInfo | |
implementation |
TypeInfo | |
lifetime |
ServiceLifetime |
Return value
Result<void, ServiceError>