From 4269970ed99b2bbe88f04af8e4bb30512bc6744c Mon Sep 17 00:00:00 2001 From: Andi482 Date: Tue, 29 Nov 2022 23:42:18 +0100 Subject: [PATCH 1/4] Removed support for .Net Framework 4.6 Upgraded test & benchmark projekt to .net 6.0 Upgraded NuGet packages. Updated CsvHelper benchmark code to the new CsvHelper version --- .../IO/Text/DelimitedRecordReaderBenchmarks.cs | 12 ++++++++---- .../NLight.Tests.Benchmarks.csproj | 4 ++-- src/NLight.Tests.Unit/NLight.Tests.Unit.csproj | 8 ++++---- src/NLight/NLight.csproj | 17 ++++++++--------- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/NLight.Tests.Benchmarks/IO/Text/DelimitedRecordReaderBenchmarks.cs b/src/NLight.Tests.Benchmarks/IO/Text/DelimitedRecordReaderBenchmarks.cs index c42a0a0..1ea2433 100644 --- a/src/NLight.Tests.Benchmarks/IO/Text/DelimitedRecordReaderBenchmarks.cs +++ b/src/NLight.Tests.Benchmarks/IO/Text/DelimitedRecordReaderBenchmarks.cs @@ -7,6 +7,8 @@ using DS = DataStreams.Csv; using LW = LumenWorks.Framework.IO.Csv; using CH = CsvHelper; +using System.Collections.Generic; +using System; namespace NLight.Tests.Benchmarks.IO.Text { @@ -106,7 +108,7 @@ public static void ReadAll_DataStreams(DelimitedRecordReaderBenchmarkArguments a public static void ReadAll_CsvHelper(DelimitedRecordReaderBenchmarkArguments args) { - var config = new CH.Configuration.Configuration + var config = new CH.Configuration.CsvConfiguration(System.Globalization.CultureInfo.InvariantCulture) { BufferSize = args.BufferSize, AllowComments = true, @@ -124,9 +126,11 @@ public static void ReadAll_CsvHelper(DelimitedRecordReaderBenchmarkArguments arg { while (reader.Read()) { - var record = reader.Context.Record; - for (int i = 0; i < record.Length; i++) - s = record[i]; + IDictionary record = (IDictionary)reader.GetRecord(); + foreach (var str in record.Values) + { + s = (string)str; + } } } else diff --git a/src/NLight.Tests.Benchmarks/NLight.Tests.Benchmarks.csproj b/src/NLight.Tests.Benchmarks/NLight.Tests.Benchmarks.csproj index 9fca4d0..08723a6 100644 --- a/src/NLight.Tests.Benchmarks/NLight.Tests.Benchmarks.csproj +++ b/src/NLight.Tests.Benchmarks/NLight.Tests.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.0 + net6.0 @@ -10,7 +10,7 @@ - + diff --git a/src/NLight.Tests.Unit/NLight.Tests.Unit.csproj b/src/NLight.Tests.Unit/NLight.Tests.Unit.csproj index 3804371..3636d14 100644 --- a/src/NLight.Tests.Unit/NLight.Tests.Unit.csproj +++ b/src/NLight.Tests.Unit/NLight.Tests.Unit.csproj @@ -1,7 +1,7 @@ - netcoreapp2.0 + net6.0 @@ -9,9 +9,9 @@ - - - + + + diff --git a/src/NLight/NLight.csproj b/src/NLight/NLight.csproj index dbed36b..99c324e 100644 --- a/src/NLight/NLight.csproj +++ b/src/NLight/NLight.csproj @@ -1,22 +1,22 @@  - netstandard2.0;net46 - 2.1.1 + netstandard2.0 + 2.2.0 Copyright (c) 2009 Sébastien Lorion Sébastien Lorion Toolbox for .NET projects https://github.com/slorion/nlight io,parser,csv,delimited,transaction,reactive,tree - Added multi-targeting support for .NET 4.6 - true - C:\projects\oss\nlight\src\NLight.snk + Increased compatibility to newer .net versions. Removed support for .NET 4.6 + true en - 2.1.1.0 - 2.1.1.0 + 2.2.0.0 + 2.2.0.0 https://github.com/slorion/nlight/blob/master/LICENSE @@ -37,8 +37,7 @@ - - + From cdc20f76e1e57edd571e344b91d5f4a5ff850795 Mon Sep 17 00:00:00 2001 From: Andreas Pampuch Date: Wed, 30 Nov 2022 15:15:10 +0100 Subject: [PATCH 2/4] Uncommented assembly signing, updated package release notes. --- src/NLight/NLight.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NLight/NLight.csproj b/src/NLight/NLight.csproj index 99c324e..95cfd44 100644 --- a/src/NLight/NLight.csproj +++ b/src/NLight/NLight.csproj @@ -9,9 +9,9 @@ Toolbox for .NET projects https://github.com/slorion/nlight io,parser,csv,delimited,transaction,reactive,tree - Increased compatibility to newer .net versions. Removed support for .NET 4.6 - + Increased compatibility to newer .net versions. Minimum supported .NET Version is 4.7.2 (.NET Standard 2.0) + true + C:\projects\oss\nlight\src\NLight.snk true en From 05dfa0f7923e07cc8d97ab616a510f6dc8b95fa1 Mon Sep 17 00:00:00 2001 From: Andi482 Date: Wed, 30 Nov 2022 15:18:26 +0100 Subject: [PATCH 3/4] Uncommented assembly signing, updated package release notes. --- src/NLight/NLight.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NLight/NLight.csproj b/src/NLight/NLight.csproj index 99c324e..95cfd44 100644 --- a/src/NLight/NLight.csproj +++ b/src/NLight/NLight.csproj @@ -9,9 +9,9 @@ Toolbox for .NET projects https://github.com/slorion/nlight io,parser,csv,delimited,transaction,reactive,tree - Increased compatibility to newer .net versions. Removed support for .NET 4.6 - + Increased compatibility to newer .net versions. Minimum supported .NET Version is 4.7.2 (.NET Standard 2.0) + true + C:\projects\oss\nlight\src\NLight.snk true en From 7433418918f43d57c9d1fc5882b28dddede9d962 Mon Sep 17 00:00:00 2001 From: Andi482 Date: Mon, 5 Dec 2022 20:45:09 +0100 Subject: [PATCH 4/4] Updated package description; Optimized CSV-Helper benchmark code to avoid using dynamic. --- .../IO/Text/DelimitedRecordReaderBenchmarks.cs | 7 ++----- src/NLight/NLight.csproj | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/NLight.Tests.Benchmarks/IO/Text/DelimitedRecordReaderBenchmarks.cs b/src/NLight.Tests.Benchmarks/IO/Text/DelimitedRecordReaderBenchmarks.cs index 1ea2433..9c70fa3 100644 --- a/src/NLight.Tests.Benchmarks/IO/Text/DelimitedRecordReaderBenchmarks.cs +++ b/src/NLight.Tests.Benchmarks/IO/Text/DelimitedRecordReaderBenchmarks.cs @@ -126,11 +126,8 @@ public static void ReadAll_CsvHelper(DelimitedRecordReaderBenchmarkArguments arg { while (reader.Read()) { - IDictionary record = (IDictionary)reader.GetRecord(); - foreach (var str in record.Values) - { - s = (string)str; - } + for (int i = 0; i < reader.ColumnCount; i++) + s = reader[i]; } } else diff --git a/src/NLight/NLight.csproj b/src/NLight/NLight.csproj index 95cfd44..e98ffea 100644 --- a/src/NLight/NLight.csproj +++ b/src/NLight/NLight.csproj @@ -9,7 +9,7 @@ Toolbox for .NET projects https://github.com/slorion/nlight io,parser,csv,delimited,transaction,reactive,tree - Increased compatibility to newer .net versions. Minimum supported .NET Version is 4.7.2 (.NET Standard 2.0) + Increased compatibility with newer .NET versions. Updated Reactive dependency to 5.0. NLight targets .NET Standard 2.0 (.NET Framework 4.6.1+, .NET Core 2.0+). true C:\projects\oss\nlight\src\NLight.snk true