Skip to content

ServiceRegistrationAttribute<TService> Class

Definition

Attribute used to define the service registration of a given type

C#
public sealed class ServiceRegistrationAttribute<TService> : ServiceRegistrationAttribute

Type Parameters

TService

Inheritance objectAttributeServiceRegistrationAttribute

Remarks

Constructor to specify the lifetime

Constructors

ServiceRegistrationAttribute(ServiceLifetime)

Attribute used to define the service registration of a given type

C#
public ServiceRegistrationAttribute(ServiceLifetime lifetime = ServiceLifetime.Singleton)

Parameters

lifetime ServiceLifetime

Remarks

Constructor to specify the lifetime