Exemplo n.º 1
0
        /// <summary>
        /// <inheritdoc cref="IPrintableDocument.AddNewChapter(string)"/>
        /// </summary>
        public IPrintableDocumentChapter AddNewChapter(string title)
        {
            IHeaderContainer chapter = _factory.CreateMarkdownContainer <IMarkdownSite>(title);

            chapter.SetHeaderBuilder(_headerBuilder.Clone());

            _chapters.Add((IPrintableDocumentChapter)chapter);

            return((IPrintableDocumentChapter)chapter);
        }
Exemplo n.º 2
0
        /// <summary>
        /// <inheritdoc cref="IPrintableDocumentChapter.AddNewParagraph"/>
        /// </summary>
        public IPrintableDocumentParagraph AddNewParagraph(string title)
        {
            IHeaderContainer newParagraphObject =
                _elementFactory.CreateMarkdownContainer <IMarkdownParagraph>(title);

            newParagraphObject.SetHeaderBuilder(_headerBuilder.Clone());

            _content.Add((IPrintable)newParagraphObject);

            return((IPrintableDocumentParagraph)newParagraphObject);
        }