Table of Contents

Method FromObjects

Namespace
DocWright.MailMerge
Assembly
DocWright.MailMerge.dll

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

records IEnumerable<T>

The records. Enumerated once, lazily.

map MergeFieldMap<T>

The field map.

Returns

IMergeDataReader

The reader, positioned before the first record.

Type Parameters

T

The 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

records or map is null.