Show / Hide Table of Contents

Class EpubNavigationItemLink

Navigation link representing a pointer to a specific place in the book's content.

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

Constructors

View Source

EpubNavigationItemLink(string, string)

Initializes a new instance of the EpubNavigationItemLink class using a specified content file URL with anchor and a specified base directory path.

Declaration
public EpubNavigationItemLink(string contentFileUrlWithAnchor, string baseDirectoryPath)
Parameters
Type Name Description
string contentFileUrlWithAnchor

Relative file path of the content file with an optional anchor (as it is specified in the EPUB manifest).

string baseDirectoryPath

The path of the directory within the EPUB archive which acts as a base directory for a relative content file path.

Exceptions
Type Condition
ArgumentNullException

The contentFileUrlWithAnchor parameter is null.

ArgumentNullException

The baseDirectoryPath parameter is null.

ArgumentException

The contentFileUrlWithAnchor parameter points to a remote URL.

View Source

EpubNavigationItemLink(string, string, string?)

Initializes a new instance of the EpubNavigationItemLink class with specified content file URL without anchor, content file path, and anchor.

Declaration
public EpubNavigationItemLink(string contentFileUrl, string contentFilePath, string? anchor)
Parameters
Type Name Description
string contentFileUrl

The file path portion of the content file URL without anchor.

string contentFilePath

The file path portion of the content file URL converted to the absolute file path within the EPUB archive.

string anchor

The anchor portion of the content file URL.

Exceptions
Type Condition
ArgumentNullException

The contentFileUrl parameter is null.

ArgumentNullException

The contentFilePath parameter is null.

ArgumentException

The contentFileUrl parameter points to a remote URL.

Properties

View Source

Anchor

Gets the anchor portion of the content file URL. For example, if the content file URL is '../content/chapter1.html#section1', then the value of this property will be 'section1'.

Declaration
public string? Anchor { get; }
Property type: string
View Source

ContentFilePath

Gets the file path portion of the content file URL converted to the absolute file path within the EPUB archive. For example, if the content file URL is '../content/chapter1.html#section1' and the base directory path is 'OPS/toc', then the value of this property will be 'OPS/content/chapter1.html'.

Declaration
public string ContentFilePath { get; }
Property type: string
View Source

ContentFileUrl

Gets the file path portion of the content file URL. For example, if the content file URL is '../content/chapter1.html#section1', then the value of this property will be '../content/chapter1.html'.

Declaration
public string ContentFileUrl { get; }
Property type: string
  • View Source
In this article
Back to top Generated by DocFX