Table of Contents

Delegate ExcelRowParser<TModel>

Namespace
ExcelReader.Core.Parser
Assembly
ExcelReader.Core.dll

Reads a matched, non-empty cell and assigns the result directly onto model in one call, instead of going through a separate ExcelCellReader<TValue> + ExcelPropertySetter<TModel, TValue> pair. Plug this into PropertyRaw(string[], ExcelRowParser<T>, bool, bool) when a single fused delegate (e.g. one emitted by the [ExcelSerializable] source generator) should replace what would otherwise be two indirect calls per bound cell per row.

public delegate bool ExcelRowParser<TModel>(ref TModel model, in Cell cell, in ExcelRowContext context) where TModel : allows ref struct

Parameters

model TModel

The model instance to mutate.

cell Cell

The cell to read; callers only invoke this for a non-empty cell.

context ExcelRowContext

The date system and format provider to convert with.

Returns

bool

true if the cell was read and assigned successfully.

Type Parameters

TModel

The row model type being read into.