Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

AddKeyed

func AddKeyed(service: TypeInfo, key: object?, implementation: TypeInfo, lifetime: ServiceLifetime) -> Result<void, ServiceError>

Declaring type: DefaultServiceCollection
Module: Neo.DependencyInjection
Assembly: Neo.DependencyInjection.dll
Source file: Services.rvn

Implements ServiceCollection.AddKeyed

Registers a keyed implementation.

Parameters

Name Type Description
service TypeInfo
key Object?
implementation TypeInfo
lifetime ServiceLifetime

Return value

Result<void, ServiceError>