Table of Contents

Class SeqPair<T>

Namespace
Hi.Common
Assembly
HiGeom.dll

Represents a sequence pair containing previous and current values. Used to track sequential state changes of a value.

public class SeqPair<T> : IEquatable<SeqPair<T>>, IWriteBin

Type Parameters

T

The type of values stored in the sequence pair

Inheritance
SeqPair<T>
Implements
Inherited Members
Extension Methods

Constructors

SeqPair()

Initializes a new instance of the SeqPair<T> class with default values for previous and current elements.

public SeqPair()

SeqPair(BinaryReader, Func<BinaryReader, T>)

Initializes a new instance of the SeqPair<T> class by deserializing from binary data.

public SeqPair(BinaryReader reader, Func<BinaryReader, T> Generator)

Parameters

reader BinaryReader

The binary reader to read data from

Generator Func<BinaryReader, T>

A function that creates objects of type T from binary data

SeqPair(T, T)

Initializes a new instance of the SeqPair<T> class with specified previous and current values.

public SeqPair(T pre, T cur)

Parameters

pre T

The previous value in the sequence

cur T

The current value in the sequence

Fields

cur

Gets or sets the current value in the sequence.

public T cur

Field Value

T

pre

Gets or sets the previous value in the sequence.

public T pre

Field Value

T

Methods

Equals(SeqPair<T>)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(SeqPair<T> other)

Parameters

other SeqPair<T>

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteBin(BinaryWriter)

Writes the object's data to a binary stream.

public void WriteBin(BinaryWriter writer)

Parameters

writer BinaryWriter

The binary writer to write to