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