private TableOfContents(Document document, XElement xml, string headerStyle) : base(document, xml) { TableOfContents.InitElement("updateFields", document); TableOfContents.InitElement("styles", document, headerStyle); }
internal static TableOfContents CreateTableOfContents(Document document, string title, IDictionary <TableOfContentsSwitches, string> switchesDictionary, string headerStyle = null, int?rightTabPos = null) { var reader = XmlReader.Create(new StringReader(string.Format(XmlTemplates.TableOfContentsXmlBase, headerStyle ?? HeaderStyle, title, rightTabPos ?? RightTabPos, TableOfContents.BuildSwitchString(switchesDictionary)))); var xml = XElement.Load(reader); return(new TableOfContents(document, xml, headerStyle)); }