Skip to content

RegistrationLifetimeAttribute Class

Definition

Defines the lifetime that should be used service registrations created using the ISpecularProvider

C#
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Interface)]
public class RegistrationLifetimeAttribute : Attribute

Inheritance objectAttribute

Remarks

Constructor to specify the lifetime

Constructors

RegistrationLifetimeAttribute(ServiceLifetime)

Defines the lifetime that should be used service registrations created using the ISpecularProvider

C#
public RegistrationLifetimeAttribute(ServiceLifetime lifetime)

Parameters

lifetime ServiceLifetime

Remarks

Constructor to specify the lifetime

Properties

Lifetime

The lifetime

C#
public ServiceLifetime Lifetime { get; }