xoofx / Tomlyn

Tomlyn is a TOML parser, validator and authoring library for .NET Framework and .NET Core
BSD 2-Clause "Simplified" License
424 stars 29 forks source link

Add support to opt-in to including fields in model access #45

Closed wattsyart closed 2 years ago

wattsyart commented 2 years ago

Hello,

This is a draft PR to propose adding TomlModelOptions.IncludeFields property that supports fields in reflection model serialization (it is irrelevant for dictionary accessors, and ignored in those cases).

I need this for my game engine which uses fields over properties in performance critical areas, where the inlined backing fields add overhead.

xoofx commented 2 years ago

Thanks!