public WindowsServiceCheck Get(IWindowsServiceCheck check)
        {
            if (check is IWindowsServiceRunningCheck)
                return WindowsServiceCheck.IsRunning(check);

            throw new ArgumentException();
        }
 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;
 }
Example #3
0
        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);
        }
Example #4
0
        public WindowsServiceCheck Get(IWindowsServiceCheck check)
        {
            if (check is IWindowsServiceRunningCheck)
            {
                return(WindowsServiceCheck.IsRunning(check));
            }

            throw new ArgumentException();
        }