Skip to content

ServiceRegistrationAttribute<TService1, TService2> Class

Definition

Attribute used to define the service registration of a given type

C#
public sealed class ServiceRegistrationAttribute<TService1, TService2> : ServiceRegistrationAttribute

Type Parameters

TService1

TService2

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