Skip to content

KeyedServiceRegistrationAttribute<TService1, TService2, TService3, TService4, TService5> 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, TService3, TService4, TService5>
{
public KeyedServiceRegistrationAttribute<TService1, TService2, TService3, TService4, KeyedServiceRegistrationAttribute(object? key, ServiceLifetime lifetime)
{
// ...
}
}
keyobject?
lifetimeServiceLifetime
Constructor to specify the key and lifetime