Skip to content

Commit

Permalink
Change to .net standard 2.0
Browse files Browse the repository at this point in the history
Update EF and other dependencies to 3.1.4, add langversion 8.0, fix csvhelper usage, remove only non useable attribute
  • Loading branch information
KuraiAndras committed May 28, 2020
1 parent a7d1acf commit 1854f0f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ASPNETDemo/ASPNETDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Example/Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.4" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion FileContextCore/Check.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static IReadOnlyList<T> HasNoNulls<T>(IReadOnlyList<T> value, [InvokerPar
}

[Conditional("DEBUG")]
public static void DebugAssert([System.Diagnostics.CodeAnalysis.DoesNotReturnIf(false)] bool condition, string message)
public static void DebugAssert(bool condition, string message)
{
if (!condition)
{
Expand Down
13 changes: 7 additions & 6 deletions FileContextCore/FileContextCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<SignAssembly Condition="'$(OS)' == 'Windows_NT'">true</SignAssembly>
<AssemblyOriginatorKeyFile>FileContextCoreCert.snk</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand All @@ -25,11 +26,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CsvHelper" Version="12.1.3" />
<PackageReference Include="EPPlus" Version="4.5.3.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="CsvHelper" Version="15.0.5" />
<PackageReference Include="EPPlus" Version="5.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.4" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2" />
<PackageReference Include="System.Xml.XmlSerializer" Version="4.3.0" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions FileContextCore/Serializer/CSVSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Text;
using FileContextCore.Infrastructure.Internal;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
using System.Globalization;

namespace FileContextCore.Serializer
{
Expand All @@ -34,7 +34,7 @@ public Dictionary<TKey, object[]> Deserialize<TKey>(string list, Dictionary<TKey
}

TextReader tr = new StringReader(list);
CsvReader reader = new CsvReader(tr);
CsvReader reader = new CsvReader(tr, CultureInfo.CurrentCulture);

reader.Read();
reader.ReadHeader();
Expand All @@ -61,7 +61,7 @@ public Dictionary<TKey, object[]> Deserialize<TKey>(string list, Dictionary<TKey
public string Serialize<TKey>(Dictionary<TKey, object[]> list)
{
StringWriter sw = new StringWriter();
CsvWriter writer = new CsvWriter(sw);
CsvWriter writer = new CsvWriter(sw, CultureInfo.CurrentCulture);

for (int i = 0; i < _propertyKeys.Length; i++)
{
Expand Down

0 comments on commit 1854f0f

Please sign in to comment.