Interface IServiceLifecycle
- Namespace
- Innova.Abstractions.Builder
- Assembly
- Innova.Data.dll
Defines the lifecycle of a service.
public interface IServiceLifecycle
Properties
- StartOrder
Gets the start order of the service. Should be higher than 0. Services with lower start order will be started first. Set it to 0 if the order does not matter.
- StopOrder
Gets the stop order of the service. Should be lower than 1000. Services with lower stop order will be stopped first. Set it to 0 if the order does not matter.
Methods
- CanStop(CancellationToken)
Checks if the service can be stopped.
- Start(CancellationToken)
Starts the service.
- Stop(CancellationToken)
Stops the service.