Exemplo n.º 1
0
        public RuleField(XmlNode node, Protocol p)
        {
            if (node.Attributes["name"] != null)
                name = node.Attributes["name"].Value;
            else
                name = "";

            type = node.Attributes["type"].Value;

            if (node.Attributes["value"] != null)
            {
                value = Expression.fromString(node.Attributes["value"].Value);
            }
        }
Exemplo n.º 2
0
 public RuleMatch(XmlNode node, Protocol proto)
 {
     if (node.Attributes["name"] != null)
     {
         // <match name=... value=... />
         Expression var = new VariableExpression("$" + node.Attributes["name"].Value);
         Expression value = Expression.fromString(node.Attributes["value"].Value);
         myExpr = new FunctionCallExpression("==", new List<Expression>(new Expression[] { var, value }));
     }
     else
     {
         // <match_expr>...</match_expr>
         myExpr = Expression.fromString(node.InnerText);
     }
 }
Exemplo n.º 3
0
 public RuleSet(XmlNode node, Protocol proto)
 {
     name = node.Attributes["name"].Value;
     value = Expression.fromString(node.Attributes["value"].Value);
 }