Skip to content

ServiceRegistrationAttribute Constructors

ClassConstructors1 member
Attribute used to define the service registration of a given type
Constructor(ServiceLifetime, Type[])Section titled Constructor(ServiceLifetime, Type[])
Attribute used to define the service registration of a given type
public sealed class ServiceRegistrationAttribute
{
public ServiceRegistrationAttribute(
ServiceLifetime lifetime,
params Type[] serviceTypes)
{
// ...
}
}
lifetimeServiceLifetime
serviceTypesType[]
Constructor to specify the service type including optional runtime