jason-c-daniels - Jcd.Validations 1.2.0

A small library containing parameter validation helpers.

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

Copy to clipboard

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

Copy to clipboard

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

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

nuget Jcd.Validations  ~> 1.2.0
Copy to clipboard

> choco install Jcd.Validations --version 1.2.0 --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.2.0" -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

  • Updated target packages. - Updated supported language version. - Fixed a rare bug where an enumerable implementing IDisposable could go undisposed.
  • .NETStandard 1.0
    • NETStandard.Library (>= 1.6.1)
  • .NETStandard 1.0: 1.0.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

1314 total downloads
83 downloads for version 1.2.0
Download (41.14 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 83
1.1.7 166.2 KB Tue, 12 Oct 2021 02:58:36 GMT 83
1.1.6 161.71 KB Mon, 11 Oct 2021 16:37:50 GMT 83
1.1.5 165.51 KB Mon, 11 Oct 2021 03:20:46 GMT 80
1.1.4 165.51 KB Mon, 11 Oct 2021 02:12:02 GMT 73
1.1.1 161.97 KB Mon, 11 Oct 2021 02:06:14 GMT 86
1.0.17 162.08 KB Sun, 10 Oct 2021 03:36:39 GMT 87
1.0.14 162.08 KB Sun, 10 Oct 2021 00:18:46 GMT 92
1.0.12 162.05 KB Sun, 10 Oct 2021 00:03:43 GMT 72
1.0.11 162.05 KB Sat, 09 Oct 2021 23:41:45 GMT 63
1.0.10 162.05 KB Sat, 09 Oct 2021 23:27:41 GMT 76
1.0.9 161.96 KB Sat, 09 Oct 2021 20:09:14 GMT 89
1.0.8 112.83 KB Sat, 09 Oct 2021 05:22:26 GMT 90
1.0.2 112.04 KB Sat, 09 Oct 2021 00:43:11 GMT 73
1.0.1 12.8 KB Fri, 08 Oct 2021 22:50:20 GMT 98
1.0.0 12.8 KB Fri, 08 Oct 2021 21:04:46 GMT 86