Skip to content

KeyedServiceRegistrationBaseAttribute Properties

ClassProperties3 members
Attribute used to define the keyed service registration of a given type. Behaves the same as ServiceRegistrationAttribute except the resulting registration is a keyed service.
KeySection titled Keynullableobject?
The key the service is registered against
public object? Key { get; }
LifetimeSection titled LifetimeServiceLifetime
The lifetime
public ServiceLifetime Lifetime { get; }
ServiceTypesSection titled ServiceTypesImmutableArray<Type>
The service type
public ImmutableArray<Type> ServiceTypes { get; }