Show / Hide Table of Contents

Struct EpubNarrationTimestamp

Represents a timestamp of the beginning or the end of the narration audio clip.

Implements
IComparable
IComparable<EpubNarrationTimestamp>
IEquatable<EpubNarrationTimestamp>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public readonly struct EpubNarrationTimestamp : IComparable, IComparable<EpubNarrationTimestamp>, IEquatable<EpubNarrationTimestamp>

Constructors

View Source

EpubNarrationTimestamp(int, int, int, int)

Initializes a new instance of the EpubNarrationTimestamp structure.

Declaration
public EpubNarrationTimestamp(int hour, int minute, int second, int millisecond)
Parameters
Type Name Description
int hour

The hours part of the timestamp.

int minute

The minutes part of the timestamp.

int second

The seconds part of the timestamp.

int millisecond

The milliseconds part of the timestamp.

Properties

View Source

Hour

Gets the hours part of the timestamp.

Declaration
public int Hour { get; }
Property type: int
View Source

Millisecond

Gets the milliseconds part of the timestamp.

Declaration
public int Millisecond { get; }
Property type: int
View Source

Minute

Gets the minutes part of the timestamp.

Declaration
public int Minute { get; }
Property type: int
View Source

Second

Gets the seconds part of the timestamp.

Declaration
public int Second { get; }
Property type: int

Methods

View Source

CompareTo(object?)

Compares the value of this instance to a specified object that contains a specified EpubNarrationTimestamp value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified EpubNarrationTimestamp value.

Declaration
public int CompareTo(object? obj)
Parameters
Type Name Description
object obj

A boxed object to compare, or null.

Returns
Type Description
int

A signed number indicating the relative values of this instance and the obj parameter. Less than zero if this instance is earlier than obj. Zero if this instance is the same as obj. Greater than zero if this instance is later than obj.

Exceptions
Type Condition
ArgumentException

The type of the obj parameter is not EpubNarrationTimestamp.

View Source

CompareTo(EpubNarrationTimestamp)

Compares the value of this instance to a specified EpubNarrationTimestamp value and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified EpubNarrationTimestamp value.

Declaration
public int CompareTo(EpubNarrationTimestamp other)
Parameters
Type Name Description
EpubNarrationTimestamp other

The object to compare to the current instance.

Returns
Type Description
int

A signed number indicating the relative values of this instance and the other parameter. Less than zero if this instance is earlier than other. Zero if this instance is the same as other. Greater than zero if this instance is later than other.

View Source

Equals(object?)

Returns a value indicating whether this instance is equal to a specified object.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj

The object to compare to this instance.

Returns
Type Description
bool

true if obj is an instance of EpubNarrationTimestamp and equals the value of this instance; otherwise, false.

Overrides
ValueType.Equals(object)
View Source

Equals(EpubNarrationTimestamp)

Returns a value indicating whether the value of this instance is equal to the value of the specified EpubNarrationTimestamp instance.

Declaration
public bool Equals(EpubNarrationTimestamp other)
Parameters
Type Name Description
EpubNarrationTimestamp other

The object to compare to this instance.

Returns
Type Description
bool

true if the other parameter equals the value of this instance; otherwise, false.

View Source

GetHashCode()

Returns the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A 32-bit signed integer hash code.

Overrides
ValueType.GetHashCode()
View Source

ToString()

Converts the value of the current EpubNarrationTimestamp object to its equivalent string representation.

Declaration
public override string ToString()
Returns
Type Description
string

A string representation of the value of the current EpubNarrationTimestamp object in h:mm:ss[.fff] format (e.g. 1:23:45.678).

Overrides
ValueType.ToString()
View Source

ToTimeSpan()

Converts the value of the current EpubNarrationTimestamp object to its equivalent TimeSpan representation.

Declaration
public TimeSpan ToTimeSpan()
Returns
Type Description
TimeSpan

A TimeSpan representation of the value of the current EpubNarrationTimestamp object.

Operators

View Source

operator ==(EpubNarrationTimestamp, EpubNarrationTimestamp)

Determines whether two specified instances of EpubNarrationTimestamp are equal.

Declaration
public static bool operator ==(EpubNarrationTimestamp left, EpubNarrationTimestamp right)
Parameters
Type Name Description
EpubNarrationTimestamp left

The first object to compare.

EpubNarrationTimestamp right

The second object to compare.

Returns
Type Description
bool

true if left and right represent the same timestamp; otherwise, false.

View Source

operator >(EpubNarrationTimestamp, EpubNarrationTimestamp)

Determines whether one specified EpubNarrationTimestamp is later than another specified EpubNarrationTimestamp.

Declaration
public static bool operator >(EpubNarrationTimestamp left, EpubNarrationTimestamp right)
Parameters
Type Name Description
EpubNarrationTimestamp left

The first object to compare.

EpubNarrationTimestamp right

The second object to compare.

Returns
Type Description
bool

true if left is later than right; otherwise, false.

View Source

operator >=(EpubNarrationTimestamp, EpubNarrationTimestamp)

Determines whether one specified EpubNarrationTimestamp is the same or later than another specified EpubNarrationTimestamp.

Declaration
public static bool operator >=(EpubNarrationTimestamp left, EpubNarrationTimestamp right)
Parameters
Type Name Description
EpubNarrationTimestamp left

The first object to compare.

EpubNarrationTimestamp right

The second object to compare.

Returns
Type Description
bool

true if left is the same or later than right; otherwise, false.

View Source

operator !=(EpubNarrationTimestamp, EpubNarrationTimestamp)

Determines whether two specified instances of EpubNarrationTimestamp are not equal.

Declaration
public static bool operator !=(EpubNarrationTimestamp left, EpubNarrationTimestamp right)
Parameters
Type Name Description
EpubNarrationTimestamp left

The first object to compare.

EpubNarrationTimestamp right

The second object to compare.

Returns
Type Description
bool

true if left and right do not represent the same timestamp; otherwise, false.

View Source

operator <(EpubNarrationTimestamp, EpubNarrationTimestamp)

Determines whether one specified EpubNarrationTimestamp is earlier than another specified EpubNarrationTimestamp.

Declaration
public static bool operator <(EpubNarrationTimestamp left, EpubNarrationTimestamp right)
Parameters
Type Name Description
EpubNarrationTimestamp left

The first object to compare.

EpubNarrationTimestamp right

The second object to compare.

Returns
Type Description
bool

true if left is earlier than right; otherwise, false.

View Source

operator <=(EpubNarrationTimestamp, EpubNarrationTimestamp)

Determines whether one specified EpubNarrationTimestamp is the same or earlier than another specified EpubNarrationTimestamp.

Declaration
public static bool operator <=(EpubNarrationTimestamp left, EpubNarrationTimestamp right)
Parameters
Type Name Description
EpubNarrationTimestamp left

The first object to compare.

EpubNarrationTimestamp right

The second object to compare.

Returns
Type Description
bool

true if left is the same or earlier than right; otherwise, false.

View Source

operator -(EpubNarrationTimestamp, EpubNarrationTimestamp)

Subtracts a specified EpubNarrationTimestamp from another specified EpubNarrationTimestamp and returns a time interval.

Declaration
public static TimeSpan operator -(EpubNarrationTimestamp first, EpubNarrationTimestamp second)
Parameters
Type Name Description
EpubNarrationTimestamp first

The timestamp value to subtract from (the minuend).

EpubNarrationTimestamp second

The timestamp value to subtract (the subtrahend).

Returns
Type Description
TimeSpan

The time interval between first and second.

Implements

IComparable
IComparable<T>
IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX