Description
I'm using v30.0.1 but I believe this is true for the latest.
using var writer = new StreamWriter(_csvStream, Encoding.Default, BufferSize, true);
using var csvWriter = new CsvWriter(writer, CultureInfo.InvariantCulture);
csvWriter.Context.Configuration.ShouldQuote = _ => false;
This seems to use the ConfigurationFunctions.ShouldQuote
instead of my delegate, I believe because it gets copied here locally on construction of CsvWriter:
CsvHelper/src/CsvHelper/CsvWriter.cs
Line 121 in 852bd46
I'm updating from v15 to v30, so I'm still trying to figure out all the changes. Is the Context.Configuration
meant to expose mutable fields on the writer's configuration? If so, should the WriteField
method use configuration.ShouldQuote
instead of storing a local copy on construction?
I understand I can set the configuration and pass it to CsvWriter, but seems like Context.Configuration.ShouldQuote
should not be settable if its not intended to take effect.