共用方式為


ServiceCharacteristics.Lifetime 屬性

定義

服務存留期。

public Microsoft.Extensions.DependencyInjection.ServiceLifetime Lifetime { get; }
member this.Lifetime : Microsoft.Extensions.DependencyInjection.ServiceLifetime
Public ReadOnly Property Lifetime As ServiceLifetime

屬性值

適用於