Method FromObjects
FromObjects<T>(IEnumerable<T>, MergeFieldMap<T>)
Opens a reader over typed records bound through an explicit field map.
public static IMergeDataReader FromObjects<T>(IEnumerable<T> records, MergeFieldMap<T> map)
Parameters
recordsIEnumerable<T>The records. Enumerated once, lazily.
mapMergeFieldMap<T>The field map.
Returns
- IMergeDataReader
The reader, positioned before the first record.
Type Parameters
TThe record type.
Remarks
The trim- and AOT-clean path, and the recommended one: the accessors are ordinary delegates, so nothing about the binding is invisible to the trimmer.
Exceptions
- ArgumentNullException
recordsormapis null.