Skip to content
This repository was archived by the owner on Sep 17, 2023. It is now read-only.

Commit 6367571

Browse files
Virus x bugfix/netcore 3.1 issues (#190)
* Fixed issue with attempt to read json from EmptyReadStream * Updates tests to use .NET Core 3.1 Skipping multitargetting for tests. * Removing part of fix as it is only needed in the populate path Co-authored-by: Valerii Goncharenko <virusx777@gmail.com>
1 parent 288fa17 commit 6367571

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

global.json

-5
This file was deleted.

source/projects/MyCouch/Serialization/DefaultSerializer.cs

+3
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ public virtual void Populate<T>(T item, Stream data) where T : class
130130
{
131131
using (var jsonReader = Configuration.ApplyConfigToReader(CreateReaderFor<T>(sr)))
132132
{
133+
if (!jsonReader.Read())
134+
return;
135+
133136
InternalSerializer.Populate(jsonReader, item);
134137
}
135138
}

source/tests/IntegrationTests/IntegrationTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
</PropertyGroup>

source/tests/Testing/Testing.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.1</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

source/tests/UnitTests/UnitTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
</PropertyGroup>

0 commit comments

Comments
 (0)