/// <summary> /// Adds all tags from <paramref name="tagSource"/> as children of the current tag. Returns the parent tag. /// </summary> /// <param name="tagSource">The source of tags to add as children.</param> /// <returns>The parent tag</returns> protected internal virtual void Append(ITagSource tagSource) { tagSource.AllTags().Each(x => { x.Parent = this; _children.Add(x); }); }
/// <summary> /// Adds all tags from <paramref name="tagSource"/> as children of the current tag. Returns the parent tag. /// </summary> /// <param name="tagSource">The source of tags to add as children.</param> /// <returns>The parent tag</returns> public HtmlTag Append(ITagSource tagSource) { tagSource.AllTags().Each(x => { x._parent = this; _children.Add(x); }); return(this); }
public void Add(ITagSource source) { source.AllTags().Each(Add); }
/// <summary> /// Adds all tags from <paramref name="tagSource"/> as children of the current tag. Returns the parent tag. /// </summary> /// <param name="tagSource">The source of tags to add as children.</param> /// <returns>The parent tag</returns> public HtmlTag Append(ITagSource tagSource) { _children.AddRange(tagSource.AllTags()); return(this); }
public static HtmlTag ForChild(this ITagSource parent, string tagName) { return(parent.AllTags().First(child => child.TagName().EqualsIgnoreCase(tagName))); }