Method
AddKeyed
abstract virtual func AddKeyed(service: TypeInfo, key: object?, implementation: TypeInfo, lifetime: ServiceLifetime) -> Result<void, ServiceError>
Declaring type: ServiceCollection
Module: Neo.DependencyInjection
Assembly: Neo.DependencyInjection.Abstractions.dll
Source file: Services.rvn
Defined by ServiceCollection.AddKeyed · Required implementation (no default).
Interface implementation: Required implementation (no default).
Registers an implementation for an exact type/key pair; null is the unkeyed identity.
Parameters
| Name | Type | Description |
|---|---|---|
service |
TypeInfo | |
key |
Object? | |
implementation |
TypeInfo | |
lifetime |
ServiceLifetime |
Return value
Result<void, ServiceError>