Пример #1
0
 /// <summary>
 /// Removes an element of the node.
 /// </summary>
 /// <param name="element">An instance of <see cref="HtmlObject"/> class.</param>
 /// <returns><see langword="true"/> if removes successfully; otherwise, <see langword="false"/>.</returns>
 public bool RemoveElement(HtmlObject element)
 {
     if (objs.Remove(element))
     {
         element.Parent = null;
         return(true);
     }
     return(false);
 }
Пример #2
0
 /// <summary>
 /// Adds an element to the node.
 /// </summary>
 /// <param name="element">An instance of <see cref="HtmlObject"/> class.</param>
 public void AddElement(HtmlObject element)
 {
     element.Parent = this;
     objs.Add(element);
 }