`CsvContext.Configuration.ShouldQuote` is not used
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:
https://github.com/JoshClose/CsvHelper/blob/852bd465e0d460eb60013abdc07fff8f68f68a59/src/CsvHelper/CsvWriter.cs#L121
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.
The only way to set those values is to pass a CsvConfiguration object to the CsvWriter constructor.
Changes were made in v20 to make CsvConfiguration readonly. https://joshclose.github.io/CsvHelper/change-log/#section-52
Changed CsvConfiguration to a read only record to eliminate threading issues.
It looks like copying the config values to a local private copy after passing CsvConfiguration to the constructor was also done because of threading issues. https://github.com/JoshClose/CsvHelper/discussions/1623#discussioncomment-249024
Would it make sense then for CsvContext to expose a read-only version of the configuration?