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
originalComponentData
Properties
Caption
Gets the caption that describes the component.
public required string Caption { get; init; }
Property Value
Empty
Gets an empty ComponentData instance with all properties set to empty strings.
public static ComponentData Empty { get; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Metadata
Gets the metadata that provides basic information about the asset's properties and characteristics.
public required AssetMetadata Metadata { get; init; }
Property Value
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
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(ComponentData?)
Determines whether this instance is equal to another ComponentData instance.
public virtual bool Equals(ComponentData? other)
Parameters
otherComponentDataThe instance to compare with.
Returns
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
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
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(ComponentData?, ComponentData?)
public static bool operator ==(ComponentData? left, ComponentData? right)
Parameters
leftComponentDatarightComponentData
Returns
operator !=(ComponentData?, ComponentData?)
public static bool operator !=(ComponentData? left, ComponentData? right)
Parameters
leftComponentDatarightComponentData