/// <summary> /// Creates new section and adds it to the end of this section. Defaults to depth of parent + 1. /// </summary> /// <param name="header">Section header</param> /// <returns>The new section</returns> public MarkdownSection AddSection(string header) { MarkdownSection section = new MarkdownSection(header, Depth + 1); elements.Add(section); return(section); }
/// <summary> /// Adds existing section to the end of this section. Depths are updated. /// </summary> /// <param name="section">Existing section.</param> public void AddSection(MarkdownSection section) { elements.Add(section); section.Depth = this.Depth + 1; }
/// <summary> /// Adds existing section to the end of this file. Depths are not updated. /// </summary> /// <param name="section">Existing section.</param> public void AddSection(MarkdownSection section) { elements.Add(section); }