Exemple #1
0
 protected async Task CheckRuleAsync(IAsyncBusinessRule rule)
 {
     if (await rule.IsBrokenAsync())
     {
         throw new BusinessRuleViolationException(rule);
     }
 }
 public BusinessRuleViolationException(IAsyncBusinessRule brokenRule)
     : base(brokenRule.Message)
 {
     BrokenRule   = brokenRule;
     this.Details = brokenRule.Message;
 }