protected Rule ruleMatch(ObjectWithDynamicAttributes state, Set<Rule> rulesSet) { foreach (Rule r in rulesSet) { if (r.evaluate(state)) { return r; } } return null; }
public ObjectWithDynamicAttributes copy() { ObjectWithDynamicAttributes copy = null; try { copy = (ObjectWithDynamicAttributes)this.GetType().GetConstructor(System.Type.EmptyTypes).Invoke(null); foreach (object val in attributes) { copy.attributes.Add(val, attributes[val]); } } catch (Exception ex) { Debug.WriteLine(ex.ToString()); } return(copy); }
public override bool evaluate(ObjectWithDynamicAttributes p) { return (left.evaluate(p) && right.evaluate(p)); }
public bool evaluate(ObjectWithDynamicAttributes p) { return (con.evaluate(p)); }
public override bool evaluate(ObjectWithDynamicAttributes p) { return value.Equals(p.getAttribute(key)); }
public override bool evaluate(ObjectWithDynamicAttributes p) { return (!con.evaluate(p)); }
public abstract bool evaluate(ObjectWithDynamicAttributes p);