public static T WithException <T, TException>(this T rule, string message, BrokenRuleSeverity severity) where T : Rule where TException : Exception { return(WithException <T, TException>(rule, message, severity, null)); }
public static T WithException <T, TException>(this T rule, string message, BrokenRuleSeverity severity, string owner) where T : Rule where TException : Exception { rule.ExceptionActions.Add(new RuleExceptionFilter { ExceptionType = typeof(TException), Message = message, Severity = severity, Owner = owner }); return(rule); }
public BrokenRule(string message, BrokenRuleSeverity severity, string owner) { Message = message; Severity = severity; Owner = owner; }
public static T WithSeverity <T>(this T rule, BrokenRuleSeverity severity) where T : ValidationRuleBase { rule.Severity = severity; return(rule); }
public static ValidationRuleBase WithException <TException>(this ValidationRuleBase rule, string message, BrokenRuleSeverity severity) where TException : Exception { return(WithException <ValidationRuleBase, TException>(rule, message, severity)); }
public static BusinessRule WithException <TException>(this BusinessRule rule, string message, BrokenRuleSeverity severity) where TException : Exception { return(WithException <BusinessRule, TException>(rule, message, severity)); }
public static Rule WithException <TException>(this Rule rule, string message, BrokenRuleSeverity severity, string owner) where TException : Exception { return(WithException <Rule, TException>(rule, message, severity, owner)); }