ServiceCharacteristics(ServiceLifetime, Boolean) 构造函数

定义

ServiceCharacteristics创建新的结构。

public ServiceCharacteristics (Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime, bool multipleRegistrations = false);
new Microsoft.EntityFrameworkCore.Infrastructure.ServiceCharacteristics : Microsoft.Extensions.DependencyInjection.ServiceLifetime * bool -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCharacteristics
Public Sub New (lifetime As ServiceLifetime, Optional multipleRegistrations As Boolean = false)

参数

lifetime
ServiceLifetime

服务生存期。

multipleRegistrations
Boolean

true 如果允许服务多次注册,则为 ; false 否则。

适用于