Skip to content

Commit b98842b

Browse files
authored
Releases/1.6 (#8)
* Tidiyng project files / Updating documentation / Updating to v1.6 * Adding Type.GetStaticConstructor() extension. * Adding an Assembly.GetLocation() extension * Adding MethodInfo.GetProperty() extension * Adding MethodInfo.IsAccessor() extensions * Tidying * Adding extra Type generic parameter polyfills * Refining Type.CanBeNull() polyfill for generic parameter types * Tidying * Adding NuGet package path to main project * Documentation improvements * Updating release notes
1 parent b3b95a7 commit b98842b

35 files changed

+966
-393
lines changed

Directory.Build.props

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,23 @@
55
<Product>AgileObjects.NetStandardPolyfills</Product>
66
<Authors>Steve Wilkes</Authors>
77
<Copyright>Copyright © AgileObjects Ltd 2021</Copyright>
8+
<LangVersion>latest</LangVersion>
89
<NeutralResourcesLanguage>en</NeutralResourcesLanguage>
10+
<RepositoryType>git</RepositoryType>
11+
<RepositoryUrl>https://github.com/AgileObjects/NetStandardPolyfills</RepositoryUrl>
12+
913
<AssemblyOriginatorKeyFile>..\NetStandardPolyfills.snk</AssemblyOriginatorKeyFile>
1014
<SignAssembly>true</SignAssembly>
1115
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
12-
<RepositoryType>git</RepositoryType>
13-
<RepositoryUrl>https://github.com/AgileObjects/NetStandardPolyfills</RepositoryUrl>
14-
<Version>1.5.0</Version>
15-
<VersionPrefix>1.5.0</VersionPrefix>
16-
<AssemblyVersion>1.5.0.0</AssemblyVersion>
17-
<FileVersion>1.5.0.0</FileVersion>
16+
17+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
18+
<WarningsAsErrors></WarningsAsErrors>
19+
<NoWarn>0649;1701;1702</NoWarn>
20+
21+
<Version>1.6.0</Version>
22+
<VersionPrefix>1.6.0</VersionPrefix>
23+
<AssemblyVersion>1.6.0.0</AssemblyVersion>
24+
<FileVersion>1.6.0.0</FileVersion>
1825
</PropertyGroup>
1926

2027
</Project>

NetStandardPolyfills.UnitTests.Net35/NetStandardPolyfills.UnitTests.Net35.csproj

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net35</TargetFramework>
5-
<LangVersion>8.0</LangVersion>
65
<RootNamespace>AgileObjects.NetStandardPolyfills.UnitTests</RootNamespace>
7-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8-
<WarningsAsErrors></WarningsAsErrors>
9-
<NoWarn>0649;1701;1702</NoWarn>
106
<DebugType>full</DebugType>
117
<IsPackable>false</IsPackable>
128
</PropertyGroup>
@@ -19,16 +15,8 @@
1915
<DefineConstants>$(DefineConstants);TRACE;FEATURE_DBNULL</DefineConstants>
2016
</PropertyGroup>
2117

22-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
23-
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
24-
</PropertyGroup>
25-
26-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
27-
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
28-
</PropertyGroup>
29-
3018
<ItemGroup>
31-
<Compile Include="..\NetStandardPolyfills.UnitTests.Net40\**\*.cs" Exclude="..\NetStandardPolyfills.UnitTests.Net40\obj\**\*.cs;">
19+
<Compile Include="..\NetStandardPolyfills.UnitTests.Net461\**\*.cs" Exclude="..\NetStandardPolyfills.UnitTests.Net461\obj\**\*.cs;">
3220
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
3321
</Compile>
3422
</ItemGroup>

NetStandardPolyfills.UnitTests.Net40/NetStandardPolyfills.UnitTests.Net40.csproj renamed to NetStandardPolyfills.UnitTests.Net461/NetStandardPolyfills.UnitTests.Net461.csproj

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net461</TargetFramework>
5-
<LangVersion>8.0</LangVersion>
65
<RootNamespace>AgileObjects.NetStandardPolyfills.UnitTests</RootNamespace>
7-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8-
<WarningsAsErrors></WarningsAsErrors>
9-
<NoWarn>0649;1701;1702</NoWarn>
106
<DebugType>full</DebugType>
117
<IsPackable>false</IsPackable>
128
</PropertyGroup>
@@ -15,14 +11,6 @@
1511
<DefineConstants>$(DefineConstants);TRACE;FEATURE_DBNULL</DefineConstants>
1612
</PropertyGroup>
1713

18-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
19-
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
20-
</PropertyGroup>
21-
22-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
23-
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
24-
</PropertyGroup>
25-
2614
<ItemGroup>
2715
<PackageReference Include="NUnit" Version="3.13.1" />
2816
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0">

NetStandardPolyfills.UnitTests.Net40/ShouldExtensions.cs renamed to NetStandardPolyfills.UnitTests.Net461/ShouldExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Collections.Generic;
55
using System.Linq;
66

7-
internal static class ShouldExtensions
7+
internal static class FluentAssertionExtensions
88
{
99
public static void ShouldBeTrue(this bool boolValue)
1010
{

NetStandardPolyfills.UnitTests.Net40/TestClasses/ConstructorTestsHelper.cs renamed to NetStandardPolyfills.UnitTests.Net461/TestClasses/ConstructorTestsHelper.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,10 @@ private ConstructorTestsHelper(int intValue)
1919
private ConstructorTestsHelper(int intValue, string stringValue, DateTime dateValue)
2020
{
2121
}
22+
23+
static ConstructorTestsHelper()
24+
{
25+
Console.WriteLine("Static!");
26+
}
2227
}
2328
}

NetStandardPolyfills.UnitTests.Net40/WhenCheckingAssemblyData.cs renamed to NetStandardPolyfills.UnitTests.Net461/WhenCheckingAssemblyData.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace AgileObjects.NetStandardPolyfills.UnitTests
22
{
3+
using System.IO;
34
using TestClasses;
45
#if FEATURE_XUNIT
56
using Xunit;
@@ -10,6 +11,19 @@
1011
#endif
1112
public class WhenCheckingAssemblyData
1213
{
14+
[Fact]
15+
public void ShouldRetrieveAnAssemblyLocation()
16+
{
17+
var assembly = typeof(WhenCheckingAssemblyData).GetAssembly();
18+
var location = assembly.GetLocation();
19+
20+
location
21+
.ShouldNotBeNull()
22+
.EndsWith(Path.GetFileName(location))
23+
.ShouldBeTrue();
24+
}
25+
26+
[Fact]
1327
public void ShouldFindTypes()
1428
{
1529
var types = typeof(WhenCheckingAssemblyData).GetAssembly().GetAllTypes();

0 commit comments

Comments
 (0)