/// <summary> /// Adds the specified name. /// </summary> /// <param name="__name">The name.</param> /// <returns></returns> public override graphWrapNode <htmlWrapper> Add(string __name) { if (!children.Contains(__name)) { var tkng = new nodeTree(__name, this); children.Add(__name, tkng); return(tkng); } else { var chd = this[__name]; graphWrapNode <htmlWrapper> wchd = chd as graphWrapNode <htmlWrapper>; wchd.item.score++; } return((graphWrapNode <htmlWrapper>) this[__name] as graphWrapNode <htmlWrapper>); }
/// <summary> /// Initializes a new instance of the <see cref="nodeTree"/> class. /// </summary> /// <param name="__html">The HTML.</param> /// <param name="__parent">The parent.</param> public nodeTree(HtmlNode __html, nodeTree __parent = null) : base() { item = __html; parent = __parent; name = item.name; }
/// <summary> /// Initializes a new instance of the <see cref="nodeTree"/> class. /// </summary> /// <param name="__name">The name.</param> /// <param name="__parent">The parent.</param> public nodeTree(string __name, nodeTree __parent = null) { name = __name; parent = __parent; item = new htmlWrapper(__name); }