Table of Contents

Struct TlvRecord

Namespace
Plugin.ByteArrays
Assembly
Plugin.ByteArrays.dll

Represents a TLV (Type-Length-Value) structure.

public readonly struct TlvRecord : IEquatable<TlvRecord>
Implements
Inherited Members
Extension Methods

Constructors

TlvRecord(byte, ushort, byte[])

Initializes a new instance of the TlvRecord struct.

public TlvRecord(byte type, ushort length, byte[] value)

Parameters

type byte

The type field.

length ushort

The length field.

value byte[]

The value field.

Properties

Length

Gets the length field of the TLV record.

public ushort Length { get; }

Property Value

ushort

Type

Gets the type field of the TLV record.

public byte Type { get; }

Property Value

byte

Value

Gets the value field of the TLV record.

public IReadOnlyList<byte> Value { get; }

Property Value

IReadOnlyList<byte>

Methods

Equals(TlvRecord)

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

public bool Equals(TlvRecord other)

Parameters

other TlvRecord

The TlvRecord to compare with the current TlvRecord.

Returns

bool

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

Equals(object?)

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

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current TlvRecord.

Returns

bool

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

GetHashCode()

Returns the hash code for this TlvRecord.

public override int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

Operators

operator ==(TlvRecord, TlvRecord)

Determines whether two TlvRecord instances are equal.

public static bool operator ==(TlvRecord left, TlvRecord right)

Parameters

left TlvRecord

The first TlvRecord to compare.

right TlvRecord

The second TlvRecord to compare.

Returns

bool

true if the TlvRecord instances are equal; otherwise, false.

operator !=(TlvRecord, TlvRecord)

Determines whether two TlvRecord instances are not equal.

public static bool operator !=(TlvRecord left, TlvRecord right)

Parameters

left TlvRecord

The first TlvRecord to compare.

right TlvRecord

The second TlvRecord to compare.

Returns

bool

true if the TlvRecord instances are not equal; otherwise, false.