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

Fix cross-version serialization #151

Closed
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
3 changes: 3 additions & 0 deletions src/Hyperion.Tests/Generator/CrossFrameworkClass.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;

namespace Hyperion.Tests.Generator
{
Expand Down Expand Up @@ -40,6 +41,8 @@ public class CrossFrameworkClass

public CrossFrameworkStruct Struct { get; set; }

public Type Type { get; set; }

public override bool Equals(object obj)
{
if (!(obj is CrossFrameworkClass))
Expand Down
7 changes: 6 additions & 1 deletion src/Hyperion.Tests/Generator/CrossFrameworkInitializer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Hyperion.Extensions;

namespace Hyperion.Tests.Generator
{
Expand Down Expand Up @@ -42,7 +46,8 @@ public static CrossFrameworkClass Init()
UInt = uint.MaxValue,
ULong = ulong.MaxValue,
UShort = ushort.MaxValue,
Boolean = true
Boolean = true,
Type = typeof(int)
};
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/Hyperion.Tests/Hyperion.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net461;netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.0;netcoreapp2.2;net461;net472</TargetFrameworks>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<LangVersion>latest</LangVersion>
<StartupObject>Hyperion.Tests.Generator.Program</StartupObject>
Expand All @@ -22,4 +22,8 @@
<ProjectReference Include="..\Hyperion\Hyperion.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="testfiles\" />
</ItemGroup>

</Project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/Hyperion.Tests/testfiles/test_file_.netcoreappversionv3.0.tf
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions src/Hyperion/Hyperion.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
<DefineConstants>$(DefineConstants);NETSTANDARD16</DefineConstants>
<DefineConstants>$(DefineConstants);NETSTANDARD16;NETSTANDARD</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);NETSTANDARD20</DefineConstants>
<DefineConstants>$(DefineConstants);NETSTANDARD20;NETSTANDARD</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
Expand Down