public static bool Validate(ServiceControlInstanceMetadata instance, Func <PathInfo, bool> promptToProceed) { var validator = new PathsValidator(instance) { Instances = ServiceControlInstance.Instances().AsEnumerable <IContainInstancePaths>().ToList() }; return(validator.RunValidation(true, promptToProceed)); }
public static void Validate(ServiceControlInstance instance) { var name = instance.Name; var validator = new PathsValidator(instance) { Instances = ServiceControlInstance.Instances().Where(p => p.Name != name).AsEnumerable <IContainInstancePaths>().ToList() }; validator.RunValidation(false); }