Path: redb-route/redb.Route.DataFormats.Csv/CsvDataFormatOptions.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.DataFormats.Csv/CsvDataFormatOptions.cs
----
using System.Globalization;
using System.Text;
namespace redb.Route.DataFormats.Csv;
/// Options of one instance (per node or per registration).
public sealed class CsvDataFormatOptions
{
/// Field delimiter. Default ,.
public string Delimiter { get; set; } = ",";
/// Whether the first record is a header (written on marshal, read on unmarshal). Default true.
public bool HasHeaderRecord { get; set; } = true;
/// Quote character. Default ".
public char Quote { get; set; } = '"';
/// Culture for number and date conversion. Default invariant.
public CultureInfo Culture { get; set; } = CultureInfo.InvariantCulture;
/// Trim whitespace around fields on read. Default false.
public bool TrimFields { get; set; }
/// Record terminator written on marshal. Default \r\n (RFC 4180).
public string NewLine { get; set; } = "\r\n";
/// Text encoding. Default UTF-8 without BOM.
public Encoding Encoding { get; set; } = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);
}