Class ExcelRecordMapBuilder<T, TRow>
Accumulates a property-to-column write plan for T, fed either by the
source generator (feature A) or by a hand-written IExcelRecordMap<T> implementation.
The write-side counterpart to ExcelRowMapBuilder<T>.
public sealed class ExcelRecordMapBuilder<T, TRow> where T : allows ref struct where TRow : IRowWriter
Type Parameters
TThe record type being mapped.
TRowThe concrete row writer the columns write through. A type parameter rather than IRowWriter so each column action compiles against that sealed class and its cell writes resolve to it directly instead of dispatching through the interface once per cell — the same trade
RecordColumns{T}.Plan{TRow}makes on the reflection side. The cost is one plan per (T,TRow) pair instead of one perT: a record written to three formats configures its map three times.
- Inheritance
-
ExcelRecordMapBuilder<T, TRow>
- Inherited Members
Methods
Column(string, Action<TRow, T>)
Adds a column: its header text, and how to write one record's value for it.
public ExcelRecordMapBuilder<T, TRow> Column(string header, Action<TRow, T> write)
Parameters
headerstringThe column's header text.
writeAction<TRow, T>Writes exactly one cell for
header's column, from a record.
Returns
- ExcelRecordMapBuilder<T, TRow>
This builder, for chaining.