Class ChdMetadataEntry

Namespace
CHDSharp.Models
Assembly
CHDSharpLib.dll

Represents a single metadata entry from a CHD file header (e.g. game name, disc label, hardware info).

public record ChdMetadataEntry : IEquatable<ChdMetadataEntry>
Inheritance
ChdMetadataEntry
Implements
Inherited Members

Constructors

ChdMetadataEntry(string, byte[])

Represents a single metadata entry from a CHD file header (e.g. game name, disc label, hardware info).

public ChdMetadataEntry(string Tag, byte[] Data)

Parameters

Tag string

Four-character tag identifying the metadata type (e.g. "GAME", "DISC", "HARD").

Data byte[]

The raw metadata payload bytes. May be ASCII text or binary data.

Properties

Data

The raw metadata payload bytes. May be ASCII text or binary data.

public byte[] Data { get; init; }

Property Value

byte[]

Flags

Metadata flags from the entry header (the top byte of the stored length field). Bit 0 (CHD_MDFLAGS_CHECKSUM) indicates the entry is covered by the combined-SHA1 verification in Chd.CheckFile.

public byte Flags { get; init; }

Property Value

byte

IsText

true if Data appears to be printable ASCII text.

public bool IsText { get; }

Property Value

bool

Tag

Four-character tag identifying the metadata type (e.g. "GAME", "DISC", "HARD").

public string Tag { get; init; }

Property Value

string

Methods

Equals(ChdMetadataEntry?)

Value equality is based on Tag and Data only; Flags is metadata and excluded.

public virtual bool Equals(ChdMetadataEntry? other)

Parameters

other ChdMetadataEntry

Returns

bool

GetHashCode()

Value equality is based on Tag and Data only; Flags is metadata and excluded.

public override int GetHashCode()

Returns

int

GetText()

Returns the ASCII text representation of the metadata data, if applicable.

public string GetText()

Returns

string

ToString()

Returns a human-readable representation: tag plus text or byte count.

public override string ToString()

Returns

string