An object that encapsulates an interruption of the service.

C# |
public sealed class InterruptEvent

All Members | Properties | ||||
Icon | Member | Description |
---|---|---|
![]() | EventCode | Gets the interrupt event code. Value can be one of:
|
![]() | GracePeriod | Returns the interrupt grace period, in milliseconds. The service will have this much time in which to clean up, before being forcefully killed. |

This object encapsulates following information: an event code, to determine the type of event that occurred a grace period, which indicates how much time the service will have to react to the event before being forcefully killed Get the last InterruptEvent from the ServiceContext.
NOTE: If any of the methods of this class are called after the Main(...) method exits, the client or service process may behave in an undefined manner (for example, hang or terminate abnormally).

Object | |
![]() | InterruptEvent |