Class EpubNavigationItemRef
A single navigation element of the book (typically within the table of contents).
Depending on the value of the Type property, it can act either as a header or as a navigation link.
Unlike EpubNavigationItem, this class contains the HtmlContentFileRef property
which (if it's not null
) holds only the reference to the file but doesn't have its content.
Inherited Members
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public class EpubNavigationItemRef
Constructors
View SourceEpubNavigationItemRef(EpubNavigationItemType, string, List<EpubNavigationItemRef>?)
Initializes a new instance of the EpubNavigationItemRef class with specified type, title, and nested items.
Declaration
public EpubNavigationItemRef(EpubNavigationItemType type, string title, List<EpubNavigationItemRef>? nestedItems = null)
Parameters
Type | Name | Description |
---|---|---|
EpubNavigationItemType | type | The value determining whether this navigation item acts as a header or as a navigation link. |
string | title | The title of the navigation element (which is either the text of the header or the title of the navigation link). |
List<EpubNavigationItemRef> | nestedItems | A list of child navigation elements constituting the nested navigational hierarchy within the navigation element. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
EpubNavigationItemRef(EpubNavigationItemType, string, EpubNavigationItemLink?, EpubLocalTextContentFileRef?, List<EpubNavigationItemRef>?)
Initializes a new instance of the EpubNavigationItemRef class with specified type, title, link, HTML content file reference, and nested items.
Declaration
public EpubNavigationItemRef(EpubNavigationItemType type, string title, EpubNavigationItemLink? link, EpubLocalTextContentFileRef? htmlContentFileRef, List<EpubNavigationItemRef>? nestedItems = null)
Parameters
Type | Name | Description |
---|---|---|
EpubNavigationItemType | type | The value determining whether this navigation item acts as a header or as a navigation link. |
string | title | The title of the navigation element (which is either the text of the header or the title of the navigation link). |
EpubNavigationItemLink | link | The link of the navigation element if it acts as a navigation link or |
EpubLocalTextContentFileRef | htmlContentFileRef | The EPUB content file reference for the navigation element or |
List<EpubNavigationItemRef> | nestedItems | A list of child navigation elements constituting the nested navigational hierarchy within the navigation element. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
Properties
View SourceHtmlContentFileRef
Gets the EPUB content file reference for the navigation element or null
if the value of the Link property is null
.
Declaration
public EpubLocalTextContentFileRef? HtmlContentFileRef { get; }
Property type: EpubLocalTextContentFileRef
View SourceLink
Gets the link of the navigation element if it acts as a navigation link or null
if it acts as a header.
Declaration
public EpubNavigationItemLink? Link { get; }
Property type: EpubNavigationItemLink
View SourceNestedItems
Gets a list of child navigation elements constituting the nested navigational hierarchy within the navigation element.
Declaration
public List<EpubNavigationItemRef> NestedItems { get; }
Property type: List<EpubNavigationItemRef>
View SourceTitle
Gets the title of the navigation element (which is either the text of the header or the title of the navigation link).
Declaration
public string Title { get; }
Property type: string
View SourceType
Gets the value determining whether this navigation item acts as a header or as a navigation link.
Declaration
public EpubNavigationItemType Type { get; }
Property type: EpubNavigationItemType
Methods
View SourceToString()
Returns a string containing the values of the Type and Title properties and the number of the elements in the NestedItems property for debugging purposes.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string containing the values of the Type and Title properties and the number of the elements in the NestedItems property. |