From c59bf57d8ed9481c00b9fe67305f06b2a2735960 Mon Sep 17 00:00:00 2001 From: Leandro Fernandes Vieira Date: Mon, 16 Oct 2023 01:26:28 -0300 Subject: [PATCH] done --- RecordParser.Benchmark/VariableLengthReaderBenchmark.cs | 2 +- .../FileReader/VariableLengthReaderRawExtensions.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RecordParser.Benchmark/VariableLengthReaderBenchmark.cs b/RecordParser.Benchmark/VariableLengthReaderBenchmark.cs index 2a78b1a..e476f46 100644 --- a/RecordParser.Benchmark/VariableLengthReaderBenchmark.cs +++ b/RecordParser.Benchmark/VariableLengthReaderBenchmark.cs @@ -180,7 +180,7 @@ public void Read_VariableLength_RecordParser_Raw(bool parallel, bool quoted) ContainsQuotedFields = quoted, ColumnCount = 8, - Separator = ',', + Separator = ",", StringPoolFactory = () => new InternPool().Intern }; diff --git a/RecordParser/Extensions/FileReader/VariableLengthReaderRawExtensions.cs b/RecordParser/Extensions/FileReader/VariableLengthReaderRawExtensions.cs index 7fbdcca..ac22f65 100644 --- a/RecordParser/Extensions/FileReader/VariableLengthReaderRawExtensions.cs +++ b/RecordParser/Extensions/FileReader/VariableLengthReaderRawExtensions.cs @@ -42,9 +42,9 @@ public class VariableLengthReaderRawOptions public int ColumnCount { get; set; } /// - /// The character that delimits columns and separate values. + /// The text (usually one character) that delimits columns and separate values. /// - public char Separator { get; set; } + public string Separator { get; set; } /// /// Options to configure parallel processing @@ -106,7 +106,7 @@ private static Get BuildRaw(int collumnCount, bool hasTransform, bool trim) public static IEnumerable ReadRecordsRaw(this TextReader reader, VariableLengthReaderRawOptions options, Func, T> parser) { var get = BuildRaw(options.ColumnCount, options.StringPoolFactory != null, options.Trim); - var sep = options.Separator.ToString(); + var sep = options.Separator; Func func = options.ContainsQuotedFields ? () => new RowByQuote(reader, Length, sep)