public bool Request(ServiceStatus ss) { SS = ss; if( ss.Status.CurrentState == SC_RUNTIME_STATUS.SERVICE_STOPPED ) { Log.Info("Restart asks for service to start..."); if (!SS.Start()) return false; HasBeenAskedToStart = true; return true; } else { HasBeenAskedToStart = false; return ss.Control(SC_CONTROL_CODE.SERVICE_CONTROL_STOP); } }
public bool Request(ServiceStatus ss) { SS = ss; if (ss.Status.CurrentState == SC_RUNTIME_STATUS.SERVICE_STOPPED) { Log.Info("Restart asks for service to start..."); if (!SS.Start()) { return(false); } HasBeenAskedToStart = true; return(true); } else { HasBeenAskedToStart = false; return(ss.Control(SC_CONTROL_CODE.SERVICE_CONTROL_STOP)); } }
public bool Request(ServiceStatus ss) { return ss.Control(SC_CONTROL_CODE.SERVICE_CONTROL_PAUSE); }
public bool Request(ServiceStatus ss) { return(ss.Control(SC_CONTROL_CODE.SERVICE_CONTROL_STOP)); }