/// <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); }
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))); }