Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.net and Dependency Updates #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions FlatFiles.Benchmark/FlatFiles.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<StartupObject>FlatFiles.Benchmark.Program</StartupObject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.0" />
<PackageReference Include="CsvHelper" Version="27.1.1" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.4" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions FlatFiles.Test/FlatFiles.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>FlatFiles.Test</AssemblyName>
<AssemblyOriginatorKeyFile>FlatFiles.Test.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
Expand All @@ -23,9 +23,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.5" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion FlatFiles/DataRecordExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET451 || NETSTANDARD2_0 || NETCOREAPP
#if NET462 || NETSTANDARD2_0 || NETCOREAPP || NET6_0
using System;
using System.Data;
using System.Reflection;
Expand Down
2 changes: 1 addition & 1 deletion FlatFiles/DataTableExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET451 || NETSTANDARD2_0 || NETCOREAPP
#if NET462 || NETSTANDARD2_0 || NETCOREAPP || NET6_0

using System;
using System.Data;
Expand Down
6 changes: 3 additions & 3 deletions FlatFiles/FlatFileDataReader.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET451 || NETSTANDARD2_0 || NETCOREAPP
#if NET462 || NETSTANDARD2_0 || NETCOREAPP || NET6_0

using System;
using System.Data;
Expand Down Expand Up @@ -230,7 +230,7 @@ public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, i
{
var values = GetValues();
var bytes = (byte[])values[i]!;
#if NET451
#if NET462
Array.Copy(bytes, fieldOffset, buffer, bufferoffset, length);
#else
Array.Copy(bytes, (int)fieldOffset, buffer, bufferoffset, length);
Expand Down Expand Up @@ -266,7 +266,7 @@ public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, i
}
var values = GetValues();
var chars = (char[])values[i]!;
#if NET451
#if NET462
Array.Copy(chars, fieldoffset, buffer, bufferoffset, length);
#else
Array.Copy(chars, (int)fieldoffset, buffer, bufferoffset, length);
Expand Down
2 changes: 1 addition & 1 deletion FlatFiles/FlatFileDataReaderOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET451 || NETSTANDARD2_0 || NETCOREAPP
#if NET462 || NETSTANDARD2_0 || NETCOREAPP || NET6_0

using System;

Expand Down
42 changes: 21 additions & 21 deletions FlatFiles/FlatFiles.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;netstandard2.1;netstandard2.0;netstandard1.6;net451</TargetFrameworks>
<TargetFrameworks>net6.0;netcoreapp3.0;netstandard2.1;netstandard2.0;netstandard1.6;net462</TargetFrameworks>
<NeutralLanguage>en-US</NeutralLanguage>
<Description>Reads and writes CSV, fixed-length and other flat file formats with a focus on schema definition, configuration and speed. Supports mapping directly between files and classes.</Description>
<Copyright>Copyright @ 2022</Copyright>
Expand Down Expand Up @@ -55,14 +55,22 @@
<DocumentationFile>bin\Release\netcoreapp3.0\FlatFiles.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net451|AnyCPU'">
<DocumentationFile>bin\Debug\net451\FlatFiles.xml</DocumentationFile>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net462|AnyCPU'">
<DocumentationFile>bin\Debug\net462\FlatFiles.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net451|AnyCPU'">
<DocumentationFile>bin\Release\net451\FlatFiles.xml</DocumentationFile>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net462|AnyCPU'">
<DocumentationFile>bin\Release\net462\FlatFiles.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
<DocumentationFile>bin\Debug\net6.0\FlatFiles.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0|AnyCPU'">
<DocumentationFile>bin\Release\net6.0\FlatFiles.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
Expand All @@ -82,28 +90,20 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PackageReference Include="System.Reflection.Emit" Version="4.6.0" />
<PackageReference Include="System.Data.Common" Version="4.3.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.1'">
<PackageReference Include="System.Reflection.Emit" Version="4.6.0" />
<PackageReference Include="System.Data.Common" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
<PackageReference Include="System.Reflection.Emit" Version="4.6.0" />
<PackageReference Include="System.Data.Common" Version="4.3.0" />
<ItemGroup Condition="'$(TargetFramework)'=='net462'">
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion FlatFiles/IFlatFileDataRecord.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET451 || NETSTANDARD2_0 || NETCOREAPP
#if NET462 || NETSTANDARD2_0 || NETCOREAPP || NET6_0

using System;
using System.Data;
Expand Down
8 changes: 4 additions & 4 deletions FlatFiles/TypeMapping/DelimitedTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ public IEnumerable<TEntity> Read(TextReader reader, DelimitedOptions? options =
return typedReader.ReadAll();
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
public IAsyncEnumerable<TEntity> ReadAsync(TextReader reader, DelimitedOptions? options = null)
{
var typedReader = GetReader(reader, options);
Expand Down Expand Up @@ -886,7 +886,7 @@ public Task WriteAsync(TextWriter writer, IEnumerable<TEntity> entities, Delimit
return typedWriter.WriteAllAsync(entities);
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
public Task WriteAsync(TextWriter writer, IAsyncEnumerable<TEntity> entities, DelimitedOptions? options = null)
{
if (entities == null)
Expand Down Expand Up @@ -1107,7 +1107,7 @@ IEnumerable<object> IDynamicDelimitedTypeMapper.Read(TextReader reader, Delimite
return untypedReader.ReadAll();
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
IAsyncEnumerable<object> IDynamicDelimitedTypeMapper.ReadAsync(TextReader reader, DelimitedOptions? options)
{
IDynamicDelimitedTypeMapper untypedMapper = this;
Expand Down Expand Up @@ -1135,7 +1135,7 @@ Task IDynamicDelimitedTypeMapper.WriteAsync(TextWriter writer, IEnumerable<objec
return untypedWriter.WriteAllAsync(entities);
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
Task IDynamicDelimitedTypeMapper.WriteAsync(TextWriter writer, IAsyncEnumerable<object> entities, DelimitedOptions? options)
{
IDynamicDelimitedTypeMapper untypedMapper = this;
Expand Down
8 changes: 4 additions & 4 deletions FlatFiles/TypeMapping/FixedLengthTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ public IEnumerable<TEntity> Read(TextReader reader, FixedLengthOptions? options
return typedReader.ReadAll();
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
public IAsyncEnumerable<TEntity> ReadAsync(TextReader reader, FixedLengthOptions? options = null)
{
var typedReader = GetReader(reader, options);
Expand Down Expand Up @@ -680,7 +680,7 @@ public Task WriteAsync(TextWriter writer, IEnumerable<TEntity> entities, FixedLe
return typedWriter.WriteAllAsync(entities);
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
public Task WriteAsync(TextWriter writer, IAsyncEnumerable<TEntity> entities, FixedLengthOptions? options = null)
{
if (entities == null)
Expand Down Expand Up @@ -902,7 +902,7 @@ IEnumerable<object> IDynamicFixedLengthTypeMapper.Read(TextReader reader, FixedL
return untypedReader.ReadAll();
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
IAsyncEnumerable<object> IDynamicFixedLengthTypeMapper.ReadAsync(TextReader reader, FixedLengthOptions? options)
{
IDynamicFixedLengthTypeMapper untypedMapper = this;
Expand Down Expand Up @@ -930,7 +930,7 @@ Task IDynamicFixedLengthTypeMapper.WriteAsync(TextWriter writer, IEnumerable<obj
return untypedWriter.WriteAllAsync(entities);
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
Task IDynamicFixedLengthTypeMapper.WriteAsync(TextWriter writer, IAsyncEnumerable<object> entities, FixedLengthOptions? options)
{
IDynamicFixedLengthTypeMapper untypedMapper = this;
Expand Down
4 changes: 2 additions & 2 deletions FlatFiles/TypeMapping/IDelimitedTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface IDelimitedTypeMapper<TEntity> : IDelimitedTypeConfiguration<TEn
/// <returns>The entities that are extracted from the file.</returns>
IEnumerable<TEntity> Read(TextReader reader, DelimitedOptions? options = null);

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Reads the entities from the given reader.
/// </summary>
Expand Down Expand Up @@ -52,7 +52,7 @@ public interface IDelimitedTypeMapper<TEntity> : IDelimitedTypeConfiguration<TEn
/// <param name="options">The options used to format the output.</param>
Task WriteAsync(TextWriter writer, IEnumerable<TEntity> entities, DelimitedOptions? options = null);

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Writes the given entities to the given stream.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions FlatFiles/TypeMapping/IDynamicDelimitedTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface IDynamicDelimitedTypeMapper : IDynamicDelimitedTypeConfiguratio
/// <returns>The entities that are extracted from the file.</returns>
IEnumerable<object> Read(TextReader reader, DelimitedOptions? options = null);

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Reads the entities from the given reader.
/// </summary>
Expand Down Expand Up @@ -51,7 +51,7 @@ public interface IDynamicDelimitedTypeMapper : IDynamicDelimitedTypeConfiguratio
/// <param name="options">The options used to format the output.</param>
Task WriteAsync(TextWriter writer, IEnumerable<object> entities, DelimitedOptions? options = null);

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Writes the given entities to the given stream.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions FlatFiles/TypeMapping/IDynamicFixedLengthTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface IDynamicFixedLengthTypeMapper : IDynamicFixedLengthTypeConfigur
/// <returns>The entities that are extracted from the file.</returns>
IEnumerable<object> Read(TextReader reader, FixedLengthOptions? options = null);

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Reads the entities from the given reader.
/// </summary>
Expand Down Expand Up @@ -51,7 +51,7 @@ public interface IDynamicFixedLengthTypeMapper : IDynamicFixedLengthTypeConfigur
/// <param name="options">The options used to format the output.</param>
Task WriteAsync(TextWriter writer, IEnumerable<object> entities, FixedLengthOptions? options = null);

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Writes the given entities to the given stream.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions FlatFiles/TypeMapping/IFixedLengthTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface IFixedLengthTypeMapper<TEntity> : IFixedLengthTypeConfiguration
/// <returns>The entities that are extracted from the file.</returns>
IEnumerable<TEntity> Read(TextReader reader, FixedLengthOptions? options = null);

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Reads the entities from the given reader.
/// </summary>
Expand Down Expand Up @@ -52,7 +52,7 @@ public interface IFixedLengthTypeMapper<TEntity> : IFixedLengthTypeConfiguration
/// <param name="options">The options controlling how the fixed-length document is written.</param>
Task WriteAsync(TextWriter writer, IEnumerable<TEntity> entities, FixedLengthOptions? options = null);

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Writes the given entities to the given writer.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion FlatFiles/TypeMapping/TypedReaderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static IEnumerable<TEntity> ReadAll<TEntity>(this ITypedReader<TEntity> r
}
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Reads each record from the given reader, such that each record is retrieved asynchronously.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion FlatFiles/TypeMapping/TypedWriterExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static async Task WriteAllAsync<TEntity>(this ITypedWriter<TEntity> write
}
}

#if !NET451 && !NETSTANDARD1_6 && !NETSTANDARD2_0
#if !NET462 && !NETSTANDARD1_6 && !NETSTANDARD2_0
/// <summary>
/// Writes all of the entities to the typed writer.
/// </summary>
Expand Down