Interface IService
Defines abstraction for an entity that is controlled by Start/Stop commands and has a status
Namespace: NFX.ServiceModel
Assembly: NFX.dll
Syntax
public interface IService : INamed, IConfigurable
Properties
Running
Returns true when service is active or about to become active. Check in service implementation loops/threads/tasks
Declaration
bool Running { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Status
Current service status
Declaration
ControlStatus Status { get; }
Property Value
Type | Description |
---|---|
ControlStatus |
Methods
CheckForCompleteStop()
Non-blocking call that returns true when the service instance has completely stopped after SignalStop()
Declaration
bool CheckForCompleteStop()
Returns
Type | Description |
---|---|
System.Boolean |
SignalStop()
Non-blocking call that initiates the stopping of the service
Declaration
void SignalStop()
Start()
Blocking call that starts the service instance
Declaration
void Start()
WaitForCompleteStop()
Blocks execution of current thread until this service has completely stopped
Declaration
void WaitForCompleteStop()