Class ExcelRecordLayout
Creates ExcelRecordLayout<T> instances.
public static class ExcelRecordLayout
- Inheritance
-
ExcelRecordLayout
- Inherited Members
Methods
FromAttributes<T>()
Creates a layout with one column per public readable, non-indexer property of T
(excluding any marked [ExcelIgnore]), headed by its [ExcelColumn] name or, failing
that, the property name, found by reflection.
[RequiresUnreferencedCode("Record writing reflects over T's public properties, which trimming may remove.")]
[RequiresDynamicCode("Record writing compiles the per-type column writer at runtime (Expression.Compile / MakeGenericMethod).")]
public static ExcelRecordLayout<T> FromAttributes<T>()
Returns
- ExcelRecordLayout<T>
The layout.
Type Parameters
TThe record type.
Remarks
Not compatible with Native AOT, and trimming can remove the properties it reads. Use Generated<T>() instead where that matters.
Generated<T>()
Creates a layout from the map the [ExcelSerializable] source generator emitted for T. Trimming and AOT safe.
public static ExcelRecordLayout<T> Generated<T>() where T : IExcelRecordMap<T>
Returns
- ExcelRecordLayout<T>
The layout.
Type Parameters
TThe record type; must implement IExcelRecordMap<T>.