Пример #1
0
        public static WindowsServiceCondition IsRunning(IWindowsServiceConditionMetadata check)
        {
            var chk = new WindowsServiceCondition(check.ServiceName, check.TimeOut);

            chk.Predicate = chk.IsRunning;
            chk.Message   = string.Format("Check that the service named '{0}' is running.", check.ServiceName);
            return(chk);
        }
Пример #2
0
        public WindowsServiceCondition Instantiate(IWindowsServiceConditionMetadata check)
        {
            if (check is IWindowsServiceRunningMetadata)
            {
                return(WindowsServiceCondition.IsRunning(check));
            }

            throw new ArgumentException();
        }