protected virtual void OnServiceStopping()
{
// Notify service event consumers of pending service stop
if ((object)ServiceStopping != null)
ServiceStopping(this, EventArgs.Empty);
// Notify all remote clients of service stop
SendServiceStateChangedResponse(ServiceState.Stopped);
}