Skip to content

Commit 89c56b6

Browse files
committed
Targeting v4
1 parent 6aaf627 commit 89c56b6

File tree

102 files changed

+516
-652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+516
-652
lines changed

Build/Build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net47</TargetFramework>
3+
<TargetFramework>net472</TargetFramework>
44
</PropertyGroup>
55
</Project>

Build/BuildScripts/CodeJam.AppVeyor.NUnit.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mkdir "$env:APPVEYOR_BUILD_FOLDER\_Results" -ErrorAction SilentlyContinue
55
$wc = New-Object System.Net.WebClient
66

77
#run .net tests
8-
$targetsDotNet = "net48","net472","net471","net47","net461","net45","net40","net35","net20"
8+
$targetsDotNet = "net48;net472;net471;net47;net461;net45;net40;net35;net20" -split ";"
99
foreach ($target in $targetsDotNet) {
1010
$logFileName = "$env:APPVEYOR_BUILD_FOLDER\_Results\$($target)_nunit_results.xml"
1111
$testAssemblies = (gci -include $include -r | `
@@ -25,7 +25,7 @@ foreach ($target in $targetsDotNet) {
2525
}
2626

2727
#run .net core tests
28-
$targetsDotNetCore = "netcoreapp3.0","netcoreapp2.1","netcoreapp1.1"
28+
$targetsDotNetCore = "netcoreapp3.0;netcoreapp2.1;netcoreapp1.1" -split ";"
2929
foreach ($target in $targetsDotNetCore) {
3030
$logFileName = "$env:APPVEYOR_BUILD_FOLDER\_Results\$($target)_nunit_results.xml"
3131
$testAssemblies = (gci -include $include -r | `

Build/Props/CodeJam.Targeting.props

Lines changed: 91 additions & 62 deletions
Large diffs are not rendered by default.

CodeJam.Blocks.Tests/CodeJam.Blocks.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<RootNamespace>CodeJam</RootNamespace>
99
<ProjectGuid>{2A52D7F6-AAFC-4AC4-9901-252C13D96E53}</ProjectGuid>
1010
<OutputType>Library</OutputType>
11-
<TargetFrameworks>net472;net461;net45;net40;net35;net20;netcoreapp3.0;netcoreapp2.1;netcoreapp1.1</TargetFrameworks>
11+
<TargetFrameworks>net48;net472;net471;net47;net461;net45;net40;net35;net20;netcoreapp3.0;netcoreapp2.1;netcoreapp1.1</TargetFrameworks>
1212
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
1313
</PropertyGroup>
1414

CodeJam.Blocks.Tests/Mapping/ChangeTypeTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if LESSTHAN_NET40 // TODO: update after fixes in Theraot.Core
2-
// Some expression types are missing if targeting to these frameworks
3-
#else
1+
#if NET40_OR_GREATER || TARGETS_NETCOREAPP // TODO: update after fixes in Theraot.Core
42
using System;
53

64
using NUnit.Framework;

CodeJam.Blocks.Tests/Mapping/ConvertTests.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if LESSTHAN_NET40 // TODO: update after fixes in Theraot.Core
2-
// Some expression types are missing if targeting to these frameworks
3-
#else
1+
#if NET40_OR_GREATER || TARGETS_NETCOREAPP // TODO: update after fixes in Theraot.Core
42
using System;
53
using System.Globalization;
64

@@ -132,9 +130,7 @@ public void ToStringTest()
132130
Convert<DateTime,string>.Expression = null;
133131
}
134132

135-
#if LESSTHAN_NETCOREAPP20
136-
// SqlInt32 is missing if targeting to these frameworks
137-
#else
133+
#if TARGETS_NET || NETCOREAPP20_OR_GREATER
138134
[Test]
139135
public void FromValue()
140136
{

CodeJam.Blocks.Tests/Mapping/DefaultValueTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if LESSTHAN_NET40 // TODO: update after fixes in Theraot.Core
2-
// Some expression types are missing if targeting to these frameworks
3-
#else
1+
#if NET40_OR_GREATER || TARGETS_NETCOREAPP // TODO: update after fixes in Theraot.Core
42
using System;
53

64
using NUnit.Framework;

CodeJam.Blocks.Tests/Mapping/Examples/MapMemberTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if LESSTHAN_NET40 // TODO: update after fixes in Theraot.Core
2-
// Some expression types are missing if targeting to these frameworks
3-
#else
1+
#if NET40_OR_GREATER || TARGETS_NETCOREAPP // TODO: update after fixes in Theraot.Core
42
using System;
53

64
using JetBrains.Annotations;

CodeJam.Blocks.Tests/Mapping/Examples/MapTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if LESSTHAN_NET40 // TODO: update after fixes in Theraot.Core
2-
// Some expression types are missing if targeting to these frameworks
3-
#else
1+
#if NET40_OR_GREATER || TARGETS_NETCOREAPP // TODO: update after fixes in Theraot.Core
42
using System;
53

64
using CodeJam.Expressions;

CodeJam.Blocks.Tests/Mapping/MapperTests.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if LESSTHAN_NET40 // TODO: update after fixes in Theraot.Core
2-
// Some expression types are missing if targeting to these frameworks
3-
#else
1+
#if NET40_OR_GREATER || TARGETS_NETCOREAPP // TODO: update after fixes in Theraot.Core
42
using System;
53
using System.Diagnostics;
64
using System.Linq;
@@ -281,10 +279,10 @@ public void MapObjects2([Values(true,false)] bool useAction)
281279
var map = new MapHelper<Source,Dest>().Map(useAction, m => m
282280
.ToMapping ("Field3", "Field2")
283281
.ToMapping<Dest>("Field6", "Field7")
284-
#if LESSTHAN_NET45
285-
.FromMapping(new DictionaryEx<string,string> { ["Field5"] = "Field4" }));
286-
#else
282+
#if NET45_OR_GREATER || TARGETS_NETCOREAPP
287283
.FromMapping(new Dictionary<string,string> { ["Field5"] = "Field4" }));
284+
#else
285+
.FromMapping(new DictionaryEx<string,string> { ["Field5"] = "Field4" }));
288286
#endif
289287
Assert.That(map.To.Field1, Is.EqualTo(1));
290288
Assert.That(map.To.Field3, Is.EqualTo(2));

0 commit comments

Comments
 (0)