public MappedHtmlNodeToReferenceNode(MappedHtmlNode parent, HtmlNode htmlNode, HtmlNode referenceNode, IEqualityComparer<HtmlNode> comparer, PropertyNameState propertyNameState) : base(parent) { if (htmlNode == null) { throw new ArgumentNullException("htmlNode"); } if (referenceNode == null) { throw new ArgumentNullException("referenceNode"); } if (comparer == null) { throw new ArgumentNullException("comparer"); } if (propertyNameState == null) { throw new ArgumentNullException("propertyNameState"); } this.htmlNode = htmlNode; this.referenceNode = referenceNode; this.comparer = comparer; this.propertyNameState = propertyNameState; base.children = MapChildren(); }
public MappedHtmlNodeToProperty(MappedHtmlNode parent, string propertyNameForTemplate, string propertyName, params HtmlNode[] mappedNodes) : base(parent) { if (string.IsNullOrWhiteSpace(propertyName)) { throw new ArgumentNullException("propertyName"); } if (string.IsNullOrWhiteSpace(propertyNameForTemplate)) { throw new ArgumentNullException("propertyNameForTemplate"); } if (mappedNodes == null) { throw new ArgumentNullException("mappedNodes"); } this.propertyName = propertyName; this.propertyNameForTemplate = propertyNameForTemplate; this.mappedNodes = mappedNodes.ToList(); referenceNode = HtmlTextNode.CreateNode(propertyNameForTemplate); base.children = new MappedHtmlNode[0]; }