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); }
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; }