Skip to content

Commit 3312a4c

Browse files
Fixes #159 and brings explicit support for .NET4.6.2 (#166)
1 parent b170a21 commit 3312a4c

File tree

6 files changed

+16
-8
lines changed

6 files changed

+16
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Ensure.That
22
Ensure.That is a simple guard clause argument validation lib, that helps you with validation of your arguments.
33

4-
Developed for: .NET5, .NET Standard 2.0 and 2.1 available via [NuGet](https://www.nuget.org/packages/ensure.that/).
4+
Developed for: .NET4.6.2, .NET5.0, .NET Standard 2.0 and 2.1 available via [NuGet](https://www.nuget.org/packages/ensure.that/).
55

66
[![Build Status](https://dev.azure.com/daniel-wertheim/os/_apis/build/status/Ensure.That-CI?branchName=master)](https://dev.azure.com/daniel-wertheim/os/_build/latest?definitionId=1&branchName=master)
77
[![NuGet](https://img.shields.io/nuget/v/ensure.that.svg)](http://nuget.org/packages/ensure.that)
88

9-
## Using extension methods
9+
## Ensure.That - Using extension methods
1010

1111
```csharp
1212
Ensure.That(myString).IsNotNullOrWhiteSpace();
@@ -39,7 +39,7 @@ Ensure.That(myString, nameof(myString)).IsNotFishy();
3939

4040
**NOTE:** If you are worried that the constructed `public readonly struct Param<T> {}` created for the argument being validated will hurt your performance you can use any of the other constructs e.g. contextual `Ensure.String` or `EnsureArg` (see below for samples).
4141

42-
## Using contextual validation
42+
## Ensure.Context - Using contextual validation
4343
Introduced in the `v7.0.0` release.
4444

4545
```csharp
@@ -62,7 +62,7 @@ public static class StringArgExtensions
6262
Ensure.String.IsNotFishy(myString, nameof(myString));
6363
```
6464

65-
### Using static simple methods
65+
### EnsureArg - Using simple static methods
6666
Introduced in the `v5.0.0` release.
6767

6868
```csharp

azure-devops/azure-pipelines-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trigger:
1414
pr: none
1515

1616
pool:
17-
vmImage: ubuntu-latest
17+
vmImage: windows-latest
1818

1919
stages:
2020
- template: stage-build.yml

azure-devops/azure-pipelines-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pr:
1919
- master
2020

2121
pool:
22-
vmImage: ubuntu-latest
22+
vmImage: windows-latest
2323

2424
stages:
2525
- template: stage-build.yml

azure-devops/stage-build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ stages:
1313
projects: 'src/*.sln'
1414
arguments: '-c $(BuildConfiguration) --no-incremental --nologo -p:TreatWarningsAsErrors=true -p:Version=$(SemVer) -p:InformationalVersion=$(CommitId)'
1515

16+
- task: DotNetCoreCLI@2
17+
displayName: 'UnitTests .Net4.6.2'
18+
inputs:
19+
command: test
20+
projects: 'src/**/UnitTests.csproj'
21+
arguments: '-c $(BuildConfiguration) -f net4.6.2 --no-build'
22+
testRunTitle: 'UnitTests .Net4.6.2'
23+
1624
- task: DotNetCoreCLI@2
1725
displayName: 'UnitTests .NetCoreApp3.1'
1826
inputs:

src/projects/EnsureThat/EnsureThat.csproj

Lines changed: 1 addition & 1 deletion
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;netstandard2.1;net5.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net4.6.2;net5.0</TargetFrameworks>
55
<Title>Ensure.That</Title>
66
<PackageId>Ensure.That</PackageId>
77
<PackageTags>ensure-that ensure that argument validation guard clause contracts</PackageTags>

src/tests/UnitTests/UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
4+
<TargetFrameworks>net4.6.2;netcoreapp3.1;net5.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
</PropertyGroup>

0 commit comments

Comments
 (0)