Exemple #1
0
 /// <summary>
 /// Adds an IfInChainOfCommand rule to the disjunctions.
 /// </summary>
 /// <returns></returns>
 public PropertyGroupPart IfInChainOfCommand()
 {
     Disjunctions.Add(new Rules.RuleDisjunction()
     {
         Rules = new List <Rules.AuthorizationRuleBase> {
             new Rules.IfInChainOfCommandRule {
                 ParentPropertyGroup = this
             }
         }
     });
     return(this);
 }
Exemple #2
0
 public bool Evaluate(ReadOnlyDictionary <string, string[]> properties)
 {
     return(Negate ^ ((Conjunctions != null ? Conjunctions.All(c => c.Evaluate(properties)) : true) &&
                      (Disjunctions != null ? Disjunctions.All(d => d.Evaluate(properties)) : true) &&
                      (Propositions != null ? Propositions.All(p => p.Evaluate(properties)) : true)));
 }