nl.siegmann.epublib.domain.Book.addSection C# (CSharp) Method

addSection() public method

Adds the resource to the table of contents of the book as a child section of the given parentSection
public addSection ( TOCReference parentSection, string sectionTitle, Resource resource ) : TOCReference
parentSection TOCReference
sectionTitle string
resource Resource
return TOCReference
        public TOCReference addSection(TOCReference parentSection, string sectionTitle, Resource resource)
        {
            getResources().add(resource);
            if (spine.findFirstResourceById(resource.getId()) < 0)
            {
                spine.addSpineReference(new SpineReference(resource));
            }
            return parentSection.addChildSection(new TOCReference(sectionTitle, resource));
        }

Same methods

Book::addSection ( string title, Resource resource ) : TOCReference