protected static void CheckRule(IBusinessRule rule) { if (rule.IsBroken()) { throw new BusinessRuleValidationException(rule); } }
protected void CheckRule(IBusinessRule rule) { if (rule.IsBroken()) { throw new BusinessRuleViolationException(rule); } }
private void CheckRule(IBusinessRule rule) { if (rule.IsBroken()) { throw new ApplicationException(rule.ExceptionResourceKey); } }
protected void CheckRule(IBusinessRule rule, Action throwProperException) { if (rule.IsBroken()) { throwProperException.Invoke(); } }
protected static void CheckRule(IBusinessRule rule) { if (rule.IsBroken()) { throw new DomainException(rule.Message); } }
protected void CheckRule(IBusinessRule businessRule) { if (businessRule.IsBroken()) { throw new BusinessRuleValidationException(businessRule); } }
protected static bool CheckRule(IBusinessRule rule) { if (rule.IsBroken()) { throw new BusinessRuleValidationException(rule); } return(false); }
protected static void CheckRule(IBusinessRule rule) { if (rule.IsBroken()) { // TODO: // throw new DomainValidationException(rule); throw new NotImplementedException(); } }