/// <summary> /// Synchronously invokes the rule /// </summary> /// <returns> /// List of validation results if the rule fails execution /// </returns> /// <param name="businessRules">An enumerable list of rule to execute</param> public static IEnumerable <ValidationResult> GetValidationResults(this IRule businessRule) { return(IRuleExtensions.GetValidationResults(new[] { businessRule }, null)); }
/// <summary> /// Synchronously invokes the rules /// </summary> /// <returns> /// List of validation results for any failed rules /// </returns> /// <param name="businessRules">An enumerable list of rule to execute</param> public static IEnumerable <ValidationResult> GetValidationResults(this IEnumerable <IRule> businessRules) { return(IRuleExtensions.GetValidationResults(businessRules, null)); }