Lyo.DataTable.Models
1.0.0
See the version list below for details.
dotnet add package Lyo.DataTable.Models --version 1.0.0
NuGet\Install-Package Lyo.DataTable.Models -Version 1.0.0
<PackageReference Include="Lyo.DataTable.Models" Version="1.0.0" />
<PackageVersion Include="Lyo.DataTable.Models" Version="1.0.0" />
<PackageReference Include="Lyo.DataTable.Models" />
paket add Lyo.DataTable.Models --version 1.0.0
#r "nuget: Lyo.DataTable.Models, 1.0.0"
#:package Lyo.DataTable.Models@1.0.0
#addin nuget:?package=Lyo.DataTable.Models&version=1.0.0
#tool nuget:?package=Lyo.DataTable.Models&version=1.0.0
Lyo.DataTable.Models
Mutable in-memory data table with sparse columns, headers, footer, thin cells, a sparse optional format map, fluent builders, and an HTML renderer. Used as the canonical tabular exchange format for Lyo.Csv, Lyo.Xlsx, and Lyo.Pdf, and for ad-hoc programmatic table construction.
This project contains all of the runtime types. The sibling Lyo.DataTable project is an empty package placeholder.
Core types
DataTable— sparse table withHeaders,Rows, andFooter. Indexerthis[int row, int col]usesrow == -1for header androw == -2for footer. Optional formatting lives in a thread-safe sparse map:GetFormat/SetFormat/ClearFormat/Formats(snapshot). Absent key = no format (never store null). Helpers:SetHeader/SetFooter/SetCell(optional format overloads clear the map when format is null; value-onlySetCellleaves an existing format),ClearCell(clears value and format),AddRow,MaxColumn. Onnet10.0,EnumerateRowsAsyncyields body rows forawait foreach(table stays fully materialised). Cell structure mutation is not itself synchronized — only the format map is concurrent-safe. One cell object per populated coordinate remains even when slim (no cell-instance pooling).DataTableRow— sparseCellsdictionary keyed by column index, withSetCell/ClearCelland an indexer.IDataTableCell—DisplayValue,ColSpan,RowSpanonly. Formatting is not on the cell.DataTableCell<T>— sealed record implementingIDataTableCell;DisplayValueisValue?.ToString() ?? "".DataTableCell<string>.Emptyis the shared empty cell.DataTableCell(static) — non-generic helpers:Empty,FromValue(string?),FromValue(string?, colSpan, rowSpan).DataTableCellFormat— sealed record of optional font/fill/align/border/number-format fields;HasAny()detects meaningful style.DataTablePoolingOptions—PoolValues,PoolFormats,PoolingCellThreshold(default 512;0= always when enabled). Section nameDataTablePooling. Create oneDataTableValueInternerper parse.DataTableValueInterner— parse-scoped (single-threaded) string/format interning via ordinary dictionaries, gated by pooling options. Not process-widestring.Intern.DataTableToHtml.ToHtmlDocument(DataTable)— renders HTML with inline styles from the format map (not from the cell type). HonorsColSpan/RowSpan.
Fluent builders
DataTableBuilder— top-level builder.AddColumn(col, configure)defines conditional formatting applied to the table format map;AddHeader/AddHeaders,AddFooter/AddFooters/AddSumFooter, andAddRowoverloads (includingBuildAndAdd).Build()materializes theDataTableand computes sum footers.DataTableRowBuilder—SetCell<T>(col, value)applies column-levelFormatWhenrules into the row's pending format map;AddCellaccepts strings, cells, or aDataTableCellBuilder.DataTableColumnBuilder—WithSumFooter();FormatWhen<T>(when, apply).DataTableCellBuilder— fluent setters for format + spans;Build()returns a thin cell;BuildFormat()/Formatreturns the optional format for the table map.
Sum footers
AddSumFooter (or WithSumFooter on a column definition) flags a column for auto-summation. At Build() time the builder reads DisplayValue from each row's cell, trims common currency prefixes ($ £ € ¥), removes thousands separators, and parses with InvariantCulture; unparseable cells contribute 0.
I/O round-trip
Lyo.Csv and Lyo.Xlsx round-trip Headers, Rows, and Footer (Xlsx also maps footer formats at row -2). Export always writes Footer when present; import peels the last physical body row into Footer only when hasFooterRow / useFooterRow is true (default false). PDF extract still fills headers and body only.
Targeting
netstandard2.0;net10.0. No NuGet dependencies; references Lyo.Exceptions for argument validation.
Limits
Slimming cells removes format fields from each cell, but one cell object per populated coordinate remains. Value pooling helps duplicate strings, not cell instances.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Exceptions— (direct, lyo)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Lyo.Exceptions (>= 1.0.0)
-
net10.0
- Lyo.Exceptions (>= 1.0.0)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Lyo.DataTable.Models:
| Package | Downloads |
|---|---|
|
Lyo.Web.Components
Blazor components library for the Lyo web UI framework with MudBlazor integration. |
|
|
Lyo.Csv.Models
CSV models and DataTable support. |
|
|
Lyo.Xlsx.Models
XLSX models (XlsxCellValue) and DataTable support. |
|
|
Lyo.Pdf.Models
PDF models and DTOs used by the Lyo PDF processing library. |
|
|
Lyo.Reporting.Web.Components
Blazor components library for browsing report definitions, running reports, and viewing/downloading generations with MudBlazor. |
GitHub repositories
This package is not used by any popular GitHub repositories.