Table of Contents

Class ReportObjectData<T>

Namespace
DocWright.Reporting.Data
Assembly
DocWright.Reporting.dll

Presents a sequence of objects as rows, with a column per selector the host declares.

public sealed class ReportObjectData<T>

Type Parameters

T

The type of the objects.

Inheritance
ReportObjectData<T>
Inherited Members

Remarks

Columns are declared, not discovered. Reading properties by reflection would not survive trimming or native AOT, and would make a renamed property silently become a missing field. A selector is compiled code: its type is the column's type, and a nullable value type or a reference type makes the column nullable.

The sequence is read lazily, once per reader, as the processor reads rows — so a sequence that streams from somewhere is not buffered here, and one that never ends is stopped by ResourceLimits.MaxReportDataSetRows rather than exhausting memory.

Constructors

ReportObjectData(IEnumerable<T>)

Initializes an adapter over a sequence.

Properties

Columns

Gets the declared columns, in ordinal order.

Methods

Column<TValue>(string, Func<T, TValue>)

Declares a column.

CreateReader()

Creates a reader that enumerates the sequence afresh.