CommonHeaderBaseTTypeIdentifier Class

Represents the base class for a common binary image header implementation.

Definition

Namespace: Gemstone.IO.Parsing
Assembly: Gemstone.IO (in Gemstone.IO.dll) Version: 1.0.110 -- Release Build+5f28d91246fb64a1bf6c938596f3050396eb7eba
public abstract class CommonHeaderBase<TTypeIdentifier> : ICommonHeader<TTypeIdentifier>
Inheritance
Object    CommonHeaderBaseTTypeIdentifier
Implements
ICommonHeaderTTypeIdentifier

Type Parameters

TTypeIdentifier
Type of identifier used to distinguish output types.

Remarks

Here is an example of a possible derived class constructor that has an integer TypeID as the first 4 bytes in the image:
C#
public CommonHeader(object state, byte[] binaryImage, int startIndex, int length)
{
    if (length > 3)
    {
        TypeID = LittleEndian.ToInt32(binaryImage, startIndex);
        State = state;
    }
    else
        throw new InvalidOperationException("Malformed image");
}

Constructors

CommonHeaderBaseTTypeIdentifierInitializes a new instance of the CommonHeaderBaseTTypeIdentifier class

Properties

State Gets or sets any additional state information that might be needed for parsing.
TypeID Gets or sets the identifier used for identifying the Type to be parsed.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also