KeyedServiceRegistrationAttribute<TService1, TService2> Constructors
ClassConstructors1 member
Attribute used to define the keyed service registration of a given type
Constructor(object?, ServiceLifetime) Section titled Constructor(object?, ServiceLifetime) Attribute used to define the keyed service registration of a given type
public sealed class KeyedServiceRegistrationAttribute<TService1, TService2>{ public KeyedServiceRegistrationAttribute<TService1, KeyedServiceRegistrationAttribute(object? key, ServiceLifetime lifetime) { // ... }}Parameters
keyobject?lifetimeServiceLifetime Remarks
Constructor to specify the key and lifetime

