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); } }
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); } }
public RuleSet(XmlNode node, Protocol proto) { name = node.Attributes["name"].Value; value = Expression.fromString(node.Attributes["value"].Value); }