示例#1
0
 /// <summary>
 /// Append the set of elements to the end of the content of the target
 /// </summary>
 public static IEnumerable <T> AppendTo <T>(this IEnumerable <T> content, HElement target) where T : HNode
 {
     if (content != null && target != null)
     {
         target.Append(content);
     }
     return(content);
 }
示例#2
0
 /// <summary>
 /// Append the element to the end of the content of the target
 /// </summary>
 public static T AppendTo <T>(this T content, HElement target) where T : HNode
 {
     if (content != null && target != null)
     {
         target.Append(content);
     }
     return(content);
 }
示例#3
0
 /// <summary>
 /// Wrap <paramref name="wrappingElement"/> around the content of the element
 /// </summary>
 public static HElement WrapInner(this HElement element, HElement wrappingElement)
 {
     if (element != null && wrappingElement != null)
     {
         if (element.HasNodes)
         {
             element.Nodes().ToList().WrapAll(wrappingElement);
         }
         else
         {
             element.Append(wrappingElement.Clone());
         }
     }
     return(element);
 }