zplCore.comzplCore.com

ZplRecordAttribute

public sealed class ZplRecordAttribute : Attribute

Compile-time data binding: the source generator of the ZplCore package writes a member reader for every class, record or struct with this attribute, and Label.For` (also PropertyPath for nested values) uses it instead of reflection. Field names resolve exactly as before – property or field names, ignoring case, nested paths like ShipTo.Name, the same values (numbers, dates, enums, null) – so a label prints the same bytes with or without the attribute. Without reflection the binding needs no kept metadata under NativeAOT or trimming, and records that only hold data (a sealed type or struct whose members are fields or auto-properties of simple types) are formatted on all processors like dictionaries (see LabelBinding.WithParallelism).

Members the generator cannot read directly (non-public getters, names that differ only in case, generic types, inaccessible types) keep the reflection path; nested types need their own attribute.

Constructors

SignatureDescription
# ZplRecordAttribute()