Show / Hide Table of Contents

Class EpubPackage

Parsed content of the OPF package of the EPUB book.

See https://www.w3.org/publishing/epub32/epub-packages.html#sec-package-doc and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm for more information.

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

Constructors

View Source

EpubPackage(string?, EpubVersion, EpubMetadata, EpubManifest, EpubSpine, EpubGuide?, List<EpubCollection>?, string?, EpubTextDirection?, string?, string?)

Initializes a new instance of the EpubPackage class.

Declaration
public EpubPackage(string? uniqueIdentifier, EpubVersion epubVersion, EpubMetadata metadata, EpubManifest manifest, EpubSpine spine, EpubGuide? guide, List<EpubCollection>? collections = null, string? id = null, EpubTextDirection? textDirection = null, string? prefix = null, string? language = null)
Parameters
Type Name Description
string uniqueIdentifier

The ID of the EpubMetadataIdentifier element that provides the preferred, or primary, identifier of the EPUB book or null if the package doesn't specify the identifier of the book.

EpubVersion epubVersion

The version of EPUB specification to which this EPUB package conforms.

EpubMetadata metadata

The meta information for the EPUB book.

EpubManifest manifest

The EPUB manifest which provides an exhaustive list of content items that constitute the EPUB book.

EpubSpine spine

The EPUB spine which defines an ordered list of EpubSpineItemRef items that represent the default reading order of the EPUB book.

EpubGuide guide

The EPUB 2 guide which provides machine-processable navigation to the key structural components of the EPUB book or null if the book doesn't have a EPUB 2 guide.

List<EpubCollection> collections

A list of EpubCollection elements which define related groups of resources within the EPUB book.

string id

The ID of the OPF package or null if the package doesn't specify an ID.

EpubTextDirection? textDirection

The default text direction of the content of the EPUB book or null if the package doesn't specify a text direction.

string prefix

The additional prefix mappings or null if the package doesn't specify additional prefix mappings.

string language

The language of the content of the EPUB book or null if the package doesn't specify the language.

Exceptions
Type Condition
ArgumentNullException

The metadata parameter is null.

ArgumentNullException

The manifest parameter is null.

ArgumentNullException

The spine parameter is null.

Properties

View Source

Collections

Gets a list of EpubCollection elements which define related groups of resources within the EPUB book.

See https://www.w3.org/publishing/epub32/epub-packages.html#elemdef-collection for more information.

Declaration
public List<EpubCollection> Collections { get; }
Property type: List<EpubCollection>
View Source

EpubVersion

Gets the version of EPUB specification to which this EPUB package conforms.

See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-package-version and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section1.3.2 for more information.

Declaration
public EpubVersion EpubVersion { get; }
Property type: EpubVersion
View Source

Guide

Gets the EPUB 2 guide which provides machine-processable navigation to the key structural components of the EPUB book or null if the book doesn't have a EPUB 2 guide.

See https://www.w3.org/publishing/epub32/epub-packages.html#sec-opf2-guide and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.6 for more information.

Declaration
public EpubGuide? Guide { get; }
Property type: EpubGuide
View Source

Id

Gets the ID of the OPF package or null if the package doesn't specify an ID.

See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-id for more information.

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

Language

Gets the language of the content of the EPUB book or null if the package doesn't specify the language.

See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-xml-lang for more information.

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

Manifest

Gets the EPUB manifest which provides an exhaustive list of content items that constitute the EPUB book.

See https://www.w3.org/publishing/epub32/epub-packages.html#sec-manifest-elem and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.3 for more information.

Declaration
public EpubManifest Manifest { get; }
Property type: EpubManifest
View Source

Metadata

Gets the meta information for the EPUB book.

See https://www.w3.org/publishing/epub32/epub-packages.html#sec-pkg-metadata and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2 for more information.

Declaration
public EpubMetadata Metadata { get; }
Property type: EpubMetadata
View Source

Prefix

Gets the additional prefix mappings or null if the package doesn't specify additional prefix mappings.

See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-package-prefix for more information.

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

Spine

Gets the EPUB spine which defines an ordered list of EpubSpineItemRef items that represent the default reading order of the EPUB book.

See https://www.w3.org/publishing/epub32/epub-packages.html#sec-pkg-spine and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.4 for more information.

Declaration
public EpubSpine Spine { get; }
Property type: EpubSpine
View Source

TextDirection

Gets the default text direction of the content of the EPUB book or null if the package doesn't specify a text direction.

See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-dir for more information.

Declaration
public EpubTextDirection? TextDirection { get; }
Property type: EpubTextDirection?
View Source

UniqueIdentifier

Gets the ID of the EpubMetadataIdentifier element that provides the preferred, or primary, identifier of the EPUB book or null if the package doesn't specify the identifier of the book. This value is required for EPUB 3 books.

See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-package-unique-identifier for more information.

Declaration
public string? UniqueIdentifier { get; }
Property type: string

Methods

View Source

GetVersionString()

Gets the string representation of the EpubVersion property.

Declaration
public string GetVersionString()
Returns
Type Description
string

String representation of the EpubVersion property.

  • View Source
In this article
Back to top Generated by DocFX