Enum ServiceLifetime
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- nanoFramework.DependencyInjection.dll
Specifies the lifetime of a service in an IServiceCollection.
public enum ServiceLifetime
Fields
Scoped = 2Specifies that a single instance of the service will be created within a scope.
Singleton = 0Specifies that a single instance of the service will be created.
Transient = 1Specifies that a new instance of the service will be created every time it is requested.