jason-c-daniels - Jcd.Validations 1.1.1

A small library containing parameter validation helpers.

PM> Install-Package Jcd.Validations -Version 1.1.1 -Source https://www.myget.org/F/jason-c-daniels/api/v3/index.json

Copy to clipboard

> nuget.exe install Jcd.Validations -Version 1.1.1 -Source https://www.myget.org/F/jason-c-daniels/api/v3/index.json

Copy to clipboard

> dotnet add package Jcd.Validations --version 1.1.1 --source https://www.myget.org/F/jason-c-daniels/api/v3/index.json

Copy to clipboard
<PackageReference Include="Jcd.Validations" Version="1.1.1" />
Copy to clipboard
source https://www.myget.org/F/jason-c-daniels/api/v3/index.json

nuget Jcd.Validations  ~> 1.1.1
Copy to clipboard

> choco install Jcd.Validations --version 1.1.1 --source https://www.myget.org/F/jason-c-daniels/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "jason-c-daniels" -SourceLocation "https://www.myget.org/F/jason-c-daniels/api/v2"
Install-Module -Name "Jcd.Validations" -RequiredVersion "1.1.1" -Repository "jason-c-daniels" 
Copy to clipboard

Jcd.Validations

A helper class to aid in parameter validation in methods.

Example Constructor Argument Validations.

    public class Conductor
    {
        ...
        public Conductor(Helper helper, int min, int max, string bossName)
        {
            _helper = Argument.IsNotNull(helper, nameof(helper));
            _min = Argument.InRange(min, 1, 10, nameof(min));
            _max = Argument.InRange(max, _min, 10, nameof(max));
            _bossName = Argument.IsNotEmpty(bossName, nameof(bossName));
            ...

Change Log

v1.2.0

  • Prevented a rare bug where a disposable enumerable would not be disposed.
  • Updated to latest language version.
  • Addressed code style issues raised by ReSharper
  • Added pre-commit hook to fixup generated markdown files.

GitHub Build status CodeFactor Grade

MyGet Nuget

API Docs

Now targeting .net standard 1.0+

  • .NETStandard 1.0
    • NETStandard.Library (>= 1.6.1)
  • .NETStandard 1.1
    • NETStandard.Library (>= 1.6.1)
  • .NETStandard 1.2
    • NETStandard.Library (>= 1.6.1)
  • .NETStandard 1.3
    • NETStandard.Library (>= 1.6.1)
  • .NETStandard 1.4
    • NETStandard.Library (>= 1.6.1)
  • .NETStandard 1.5
    • NETStandard.Library (>= 1.6.1)
  • .NETStandard 1.6
    • NETStandard.Library (>= 1.6.1)
  • .NETStandard 1.7
    • NETStandard.Library (>= 1.6.1)
  • .NETStandard 2.0
  • .NETStandard 2.1
  • .NETStandard 1.0: 1.0.0.0
  • .NETStandard 1.1: 1.1.0.0
  • .NETStandard 1.2: 1.2.0.0
  • .NETStandard 1.3: 1.3.0.0
  • .NETStandard 1.4: 1.4.0.0
  • .NETStandard 1.5: 1.5.0.0
  • .NETStandard 1.6: 1.6.0.0
  • .NETStandard 1.7: 1.7.0.0
  • .NETStandard 2.0: 2.0.0.0
  • .NETStandard 2.1: 2.1.0.0

Owners

Jason C. Daniels

Authors

Jason C Daniels

Project URL

https://github.com/jason-c-daniels/Jcd.Validations

License

MIT

Tags

argument parameter validation guard guards

Info

19 total downloads
0 downloads for version 1.1.1
Download (161.97 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
1.2.0 41.14 KB Mon, 11 Mar 2024 19:15:31 GMT 2
1.1.7 166.2 KB Tue, 12 Oct 2021 02:58:36 GMT 2
1.1.6 161.71 KB Mon, 11 Oct 2021 16:37:50 GMT 2
1.1.5 165.51 KB Mon, 11 Oct 2021 03:20:46 GMT 0
1.1.4 165.51 KB Mon, 11 Oct 2021 02:12:02 GMT 2
1.1.1 161.97 KB Mon, 11 Oct 2021 02:06:14 GMT 0
1.0.17 162.08 KB Sun, 10 Oct 2021 03:36:39 GMT 1
1.0.14 162.08 KB Sun, 10 Oct 2021 00:18:46 GMT 1
1.0.12 162.05 KB Sun, 10 Oct 2021 00:03:43 GMT 0
1.0.11 162.05 KB Sat, 09 Oct 2021 23:41:45 GMT 0
1.0.10 162.05 KB Sat, 09 Oct 2021 23:27:41 GMT 0
1.0.9 161.96 KB Sat, 09 Oct 2021 20:09:14 GMT 0
1.0.8 112.83 KB Sat, 09 Oct 2021 05:22:26 GMT 9
1.0.2 112.04 KB Sat, 09 Oct 2021 00:43:11 GMT 0
1.0.1 12.8 KB Fri, 08 Oct 2021 22:50:20 GMT 0
1.0.0 12.8 KB Fri, 08 Oct 2021 21:04:46 GMT 0