コード例 #1
0
ファイル: HtmlTag.cs プロジェクト: adam-drewery/htmltags
 /// <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);
     });
 }
コード例 #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);
 }
コード例 #3
0
 public void Add(ITagSource source)
 {
     source.AllTags().Each(Add);
 }
コード例 #4
0
ファイル: HtmlTag.cs プロジェクト: reharik/CCHtmlHelpers
 /// <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);
 }
コード例 #5
0
 public static HtmlTag ForChild(this ITagSource parent, string tagName)
 {
     return(parent.AllTags().First(child => child.TagName().EqualsIgnoreCase(tagName)));
 }
コード例 #6
0
ファイル: HtmlDocument.cs プロジェクト: strvmarv/htmltags
 public void Add(ITagSource source)
 {
     source.AllTags().Each(Add);
 }