Ejemplo n.º 1
0
 /// <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);
     });
 }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 public void Add(ITagSource source)
 {
     source.AllTags().Each(Add);
 }
Ejemplo n.º 4
0
 /// <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);
 }
Ejemplo n.º 5
0
 public static HtmlTag ForChild(this ITagSource parent, string tagName)
 {
     return(parent.AllTags().First(child => child.TagName().EqualsIgnoreCase(tagName)));
 }
Ejemplo n.º 6
0
 public void Add(ITagSource source)
 {
     source.AllTags().Each(Add);
 }