Pitcher 2.1.0

Pitcher is helper library to simplify throwing exceptions and make methods easier to inline by reducing code size.

Install-Package Pitcher -Version 2.1.0
dotnet add package Pitcher --version 2.1.0
<PackageReference Include="Pitcher" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pitcher --version 2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

2.1.0:
     - [Feature] Use "is null" instead of "== null" for null checks (#10)
     - [Feature] Add Throw.ArgumentOutOfRange.WhenNegativeNumber() to throw an ArgumentOutOfRangeException when a number is less than zero (#11)
     - [Feature] Add Throw.ArgumentOutOfRange.WhenPositiveNumber() to throw an ArgumentOutOfRangeException when a number is zero or more (#12)
     - [Feature]] Add Throw.ArgumentOutOfRange.WhenLessThan<T>() where T is IComparable<T> to throw an ArgumentOutOfRangeException when the argument is less than the specified value (#13)
     - [Feature]] Add Throw.ArgumentOutOfRange.WhenMoreThan<T>() where T is IComparable<T> to throw an ArgumentOutOfRangeException when the argument is more than the specified value (#14)
     2.0.0:
     - [Breaking] Strong-named the assembly (#9)
     - [Breaking] Moved to a single NETSTANDARD2.0 TFM (#5)
     - [Deprecated] Throw.ArgumentNull.WhenNull(string, string) and Throw.ArgumentNull.WhenNull(string, string, string) are marked as obsolete (#7)
     - [Feature] Added Throw.ArgumentNull.WhenNullOrEmpty(string, string) and Throw.ArgumentNull.WhenNullOrEmpty(string, string, string) to throw an ArgumentNullException on null or empty strings (#7)
     - [Feature] Added Throw.ArgumentNull.WhenNullOrEmpty<T>(IEnumerable<T>, string) and Throw.ArgumentNull.WhenNullOrEmpty<T>(IEnumerable<T>, string, string) to throw an ArgumentNullException on null or empty enumerables (#6)
     1.4.0:
     - [Feature] Moved from SourceLink with embedded PDB to a .snupkg on NuGet.org for debugging (#3)
     - [Feature] Added overloads for Throw.ArgumentNull.WhenNull() for strings (#4)
     1.3.0:
     - [Feature] Added Throw.When(bool, Func<Exception>)
     1.2.0:
     - [Feature] Enabled SourceLink support (#1)
     1.1.0:
     - [Fix] Removed expensive null check on arguments in Throw.This() and Throw.When()

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.1.0 142 9/13/2019
2.0.0 75 8/18/2019
1.4.0 217 5/19/2019
1.3.0 165 3/31/2019
1.2.0 289 10/14/2018
1.1.0 198 8/25/2018
1.0.0 242 6/23/2018
1.0.0-beta4 212 6/19/2018
1.0.0-beta3 213 6/12/2018
1.0.0-beta2 218 6/11/2018
1.0.0-beta1 212 6/11/2018