Skip to content

A set of C# helper classes to aid in parameter validation in methods.

License

Notifications You must be signed in to change notification settings

jason-c-daniels/Jcd.Validations

Repository files navigation

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

About

A set of C# helper classes to aid in parameter validation in methods.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published