CsvHelper icon indicating copy to clipboard operation
CsvHelper copied to clipboard

Allow ClassMaps to be specified via CsvConfiguration

Open IanKemp opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. Currently, ClassMaps can only be registered for mapping purposes by calling methods on the CsvContext obtained from a reader or writer. This is inconsistent with the rest of the API, which allows up-front configuration via CsvConfiguration.

Describe the solution you'd like Add RegisterClassMap methods to CsvConfiguration, that mimic those available on CsvContext.

IanKemp avatar Jul 19 '21 10:07 IanKemp

It actually used to be like that. The configuration is immutable and all mutable properties were moved to the context. This was to fix issues people were having with multi-threading.

JoshClose avatar Jul 19 '21 20:07 JoshClose