/// <summary> /// Handler to receive control events, such as Ctrl-C and logoff and /// shutdown events. As a minimum, this logs the event, so that a record /// of why the process exited is maintained. /// </summary> /// <param name="ctrlType">The type of event that occurred.</param> /// <returns>True, indicating we have handled the event.</returns> static bool CtrlHandler(EInterruptTypes ctrlType) { _log.Warn("An interrupt [" + ctrlType + "] has been received"); Interrupted = true; return(true); }
/// <summary> /// Handler to receive control events, such as Ctrl-C and logoff and /// shutdown events. As a minimum, this logs the event, so that a record /// of why the process exited is maintained. /// </summary> /// <param name="ctrlType">The type of event that occurred.</param> /// <returns>True, indicating we have handled the event.</returns> static bool CtrlHandler(EInterruptTypes ctrlType) { _log.Warn("An interrupt [" + ctrlType + "] has been received"); Interrupted = true; return true; }