예제 #1
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="rules">Простые правила безопасности</param>
 public ComplexRule(ISecurityRule[] rules)
 {
     this.rules = rules;
     this.supportedObjectTypes = null;
 }
예제 #2
0
#pragma warning disable 1591 // Xml Comments
        public void AddRule(ISecurityRule rule)
        {
            _rules.Add(rule);
        }
예제 #3
0
 /// <summary>
 /// Add an instance of an <see cref="ISecurityRule"/> that was unable to be evaluted because it encountered an exception
 /// </summary>
 /// <param name="rule">The instance of the <see cref="ISecurityRule"/> that could not be evaluted.</param>
 /// <param name="exception">The exception that prevented the <see cref="ISecurityRule"/> from being evaluated.</param>
 public void AddErrorRule(ISecurityRule rule, Exception exception)
 {
     _rulesThatCausedError.Add(new RuleEvaluationError(rule, exception));
 }
예제 #4
0
 /// <summary>
 /// Instantiates an instance of <see cref="RuleEvaluationError"/>
 /// </summary>
 /// <param name="rule"><see cref="ISecurityRule"/> that encounted the error when evaluating.</param>
 /// <param name="error">The error that was encountered</param>
 public RuleEvaluationError(ISecurityRule rule, Exception error)
 {
     Error = error;
     Rule = rule;
 }
예제 #5
0
 /// <summary>
 /// Add an instance of an <see cref="ISecurityRule"/> that was broken during Authorization
 /// </summary>
 /// <param name="rule">An instance of a broken <see cref="ISecurityRule"/></param>
 public void AddBrokenRule(ISecurityRule rule)
 {
     _brokenRules.Add(rule);
 }
예제 #6
0
#pragma warning disable 1591 // Xml Comments
        public void AddRule(ISecurityRule rule)
        {
            _rules.Add(rule);
        }
예제 #7
0
 /// <summary>
 /// Instantiates an instance of <see cref="RuleEvaluationError"/>
 /// </summary>
 /// <param name="rule"><see cref="ISecurityRule"/> that encounted the error when evaluating.</param>
 /// <param name="error">The error that was encountered</param>
 public RuleEvaluationError(ISecurityRule rule, Exception error)
 {
     Error = error;
     Rule  = rule;
 }
예제 #8
0
 /// <summary>
 /// Add an instance of an <see cref="ISecurityRule"/> that was unable to be evaluted because it encountered an exception
 /// </summary>
 /// <param name="rule">The instance of the <see cref="ISecurityRule"/> that could not be evaluted.</param>
 /// <param name="exception">The exception that prevented the <see cref="ISecurityRule"/> from being evaluated.</param>
 public void AddErrorRule(ISecurityRule rule, Exception exception)
 {
     _rulesThatCausedError.Add(new RuleEvaluationError(rule,exception));
 }
예제 #9
0
 /// <summary>
 /// Add an instance of an <see cref="ISecurityRule"/> that was broken during Authorization
 /// </summary>
 /// <param name="rule">An instance of a broken <see cref="ISecurityRule"/></param>
 public void AddBrokenRule(ISecurityRule rule)
 {
     _brokenRules.Add(rule);
 }