Table of Contents

Class ComponentData

Namespace
Tudormobile.IronLedgerLib
Assembly
Tudormobile.IronLedgerLib.dll

Component data common to all components.

public record ComponentData : IEquatable<ComponentData>
Inheritance
ComponentData
Implements
Inherited Members
Extension Methods

Constructors

ComponentData()

public ComponentData()

ComponentData(ComponentData)

protected ComponentData(ComponentData original)

Parameters

original ComponentData

Properties

Caption

Gets the caption that describes the component.

public required string Caption { get; init; }

Property Value

string

Empty

Gets an empty ComponentData instance with all properties set to empty strings.

public static ComponentData Empty { get; }

Property Value

ComponentData

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Metadata

Gets the metadata that provides basic information about the asset's properties and characteristics.

public required AssetMetadata Metadata { get; init; }

Property Value

AssetMetadata

Remarks

The Metadata property is initialized when the asset is created and is immutable thereafter. It contains essential information used for asset management and processing.

Properties

Gets the ordered collection of component-specific properties. The order is determined by the provider that creates the component.

public required IReadOnlyList<ComponentProperty> Properties { get; init; }

Property Value

IReadOnlyList<ComponentProperty>

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(ComponentData?)

Determines whether this instance is equal to another ComponentData instance.

public virtual bool Equals(ComponentData? other)

Parameters

other ComponentData

The instance to compare with.

Returns

bool

true if Metadata, Caption, and the sequence of Properties are all equal; otherwise false.

Remarks

This override is required because IReadOnlyList<T> uses reference equality by default. Without it, two records with identical but distinct property list instances would incorrectly compare as unequal.

GetHashCode()

public override int GetHashCode()

Returns

int

Remarks

Combines Metadata, Caption, and each element of Properties so the hash is consistent with Equals(ComponentData?).

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ComponentData?, ComponentData?)

public static bool operator ==(ComponentData? left, ComponentData? right)

Parameters

left ComponentData
right ComponentData

Returns

bool

operator !=(ComponentData?, ComponentData?)

public static bool operator !=(ComponentData? left, ComponentData? right)

Parameters

left ComponentData
right ComponentData

Returns

bool