ServiceLifetime 열거형

정의

에 있는 IServiceCollection서비스의 수명을 지정합니다.

public enum class ServiceLifetime
public enum ServiceLifetime
type ServiceLifetime = 
Public Enum ServiceLifetime
상속
ServiceLifetime

필드

Name Description
Singleton 0

서비스의 단일 인스턴스가 생성되도록 지정합니다.

Scoped 1

각 범위에 대해 서비스의 새 인스턴스가 생성되도록 지정합니다.

Transient 2

요청될 때마다 서비스의 새 인스턴스가 생성되도록 지정합니다.

적용 대상