Example #1
0
        public void ReadXml(XmlNode xmlNode, RdcTreeNode node, ICollection <string> errors)
        {
            foreach (XmlNode childNode in xmlNode.ChildNodes)
            {
                switch (childNode.Name)
                {
                case "property":
                    Property = new RuleProperty(childNode.InnerText.ParseEnum <ServerProperty>());
                    break;

                case "operator":
                    Operator = childNode.InnerText.ParseEnum <RuleOperator>();
                    break;

                case "value":
                    Value = childNode.InnerText;
                    break;

                default:
                    throw new NotImplementedException();
                }
            }
        }
Example #2
0
 public Rule(RuleProperty property, RuleOperator operation, object value)
 {
     Property = property;
     Operator = operation;
     Value    = value;
 }