Esempio n. 1
0
        public static HtmlPatternTraits FromHtmlPattern(HtmlPattern pattern)
        {
            HtmlPatternTraits traits = new HtmlPatternTraits();

            traits.DOMHeightCollapsed = pattern.DOMHeightCollapsed;
            traits.LCAXPath           = pattern.LeastCommonAncestor == null ? null : pattern.LeastCommonAncestor.XPath;
            traits.VisualScore        = pattern.VisualScore;
            return(traits);
        }
Esempio n. 2
0
 public HtmlPattern(HtmlPattern other)
 {
     XPath               = other.XPath;
     ItemBaseXPath       = other.ItemBaseXPath;
     RelXPath            = other.RelXPath;
     LeastCommonAncestor = other.LeastCommonAncestor;
     LCAXPath            = other.LCAXPath;
     ItemCount           = other.ItemCount;
     AverageTextLength   = other.AverageTextLength;
     LevelIgnored        = other.LevelIgnored;
     VisualScore         = other.VisualScore;
     Score               = other.Score;
 }