Show / Hide Table of Contents

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.

Inheritance
object
EpubNavigationItemRef
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public class EpubNavigationItemRef

Constructors

View Source

EpubNavigationItemRef(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 title parameter is null.

View Source

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 null if it acts as a header.

EpubLocalTextContentFileRef htmlContentFileRef

The EPUB content file reference for the navigation element or null if the value of the link parameter is null.

List<EpubNavigationItemRef> nestedItems

A list of child navigation elements constituting the nested navigational hierarchy within the navigation element.

Exceptions
Type Condition
ArgumentNullException

The title parameter is null.

Properties

View Source

HtmlContentFileRef

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 Source

Link

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 Source

NestedItems

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 Source

Title

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 Source

Type

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 Source

ToString()

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.

Overrides
object.ToString()
  • View Source
In this article
Back to top Generated by DocFX