ServiceLifetime
Wisej.Services.ServiceLifetime
Last updated
Wisej.Services.ServiceLifetime
Last updated
Namespace: Wisej.Services
Assembly: Wisej.Framework (3.2.0.0)
Specifies the lifetime of a service.
Session
A new instance of the service is created and cached for the current session; it will be automatically disposed, if it implements an , at the end of the session.
Shared
A single static instance of the service is available to all sessions.
Thread
A new instance of the service is created for each new thread; it will be automatically disposed, if it implements an , at the end of the request.
Transient
A new instance of the service is created every time it's requested. The consumer is responsible for disposing it.
Registers a scoped service.