public static WindowsServiceCheck IsRunning(IWindowsServiceCheck check) { var chk = new WindowsServiceCheck(check.ServiceName, check.TimeOut); chk.Predicate = chk.IsRunning; chk.Message = string.Format("Check that the service named '{0}' is running.", check.ServiceName); return chk; }
public static WindowsServiceCheck IsRunning(IWindowsServiceCheck check) { var chk = new WindowsServiceCheck(check.ServiceName, check.TimeOut); chk.Predicate = chk.IsRunning; chk.Message = string.Format("Check that the service named '{0}' is running.", check.ServiceName); return(chk); }
public WindowsServiceCheck Get(IWindowsServiceCheck check) { if (check is IWindowsServiceRunningCheck) { return(WindowsServiceCheck.IsRunning(check)); } throw new ArgumentException(); }