public static XpathExpressionInfo Duplicate(XpathExpressionInfo xei)
 {
     //XpathExpressionInfo xei2 = new XpathExpressionInfo(xei.CompiledExpression, xei.XpathExpression, xei.CssClassSelector);
     //xei2.NumMatches = xei.NumMatches;
     //xei2.RootAnchorName = xei.RootAnchorName;
     return(xei.MemberwiseClone() as XpathExpressionInfo);
 }
Esempio n. 2
0
 private static bool NodeMatches(XPathNavigator node,
                                 List <XpathExpressionInfo> lstXei,
                                 out XpathExpressionInfo theMatch)
 {
     foreach (var xei in lstXei)
     {
         if (node.Matches(xei.CompiledExpression))
         {
             theMatch = xei;
             return(true); // found a match :-)
         }
     }
     theMatch = null;
     return(false); // no match found :-(
 }