public AuthorizeActorResult IsAuthorized(object actionToAuthorize) { var result = new AuthorizeActorResult(this); foreach (var rule in _rules) { try { if(!rule.IsAuthorized(actionToAuthorize)) result.AddBrokenRule(rule); } catch (Exception ex) { result.AddErrorRule(rule,ex); } } return result; }
public AuthorizeActorResult IsAuthorized(object actionToAuthorize) { var result = new AuthorizeActorResult(this); foreach (var rule in _rules) { try { if (!rule.IsAuthorized(actionToAuthorize)) { result.AddBrokenRule(rule); } } catch (Exception ex) { result.AddErrorRule(rule, ex); } } return(result); }