Light.GuardClauses 7.0.0

A lightweight .NET library for expressive Guard Clauses.

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

Light.GuardClauses 7.0.0

  • added length assertions for Span<T>
  • added Check.InvalidArgument (thanks to Igor Rončević for his contribution)
  • added new length assertions for strings
  • IsValidEnumValue and MustBeValidEnumValue now do not allocate memory when checking a flags enum value for validity (in .NET Standard 1.0 and 2.0 as well as .NET 4.5)

Breaking Changes:

  • EnumInfo<T>.EnumConstants now returns ReadOnlyMemory<T> in .NET Standard 2.0 and .NET 4.5
  • new dependencies: System.Runtime.CompilerServices.Unsafe (.NET Standard 1.0 and 2.0 as well as .NET 4.5) and System.Memory (.NET Standard 2.0 and .NET 4.5)

Light.GuardClauses 7.0.0

  • added length assertions for Span<T>
  • added Check.InvalidArgument (thanks to Igor Rončević for his contribution)
  • added new length assertions for strings
  • IsValidEnumValue and MustBeValidEnumValue now do not allocate memory when checking a flags enum value for validity (in .NET Standard 1.0 and 2.0 as well as .NET 4.5)

Breaking Changes:

  • EnumInfo<T>.EnumConstants now returns ReadOnlyMemory<T> in .NET Standard 2.0 and .NET 4.5
  • new dependencies: System.Runtime.CompilerServices.Unsafe (.NET Standard 1.0 and 2.0 as well as .NET 4.5) and System.Memory (.NET Standard 2.0 and .NET 4.5)

Release Notes

Light.GuardClauses 7.0.0
--------------------------------
- added length assertions for Span<T>
- added Check.InvalidArgument (thanks to Igor Rončević for his contribution)
- added new length assertions for strings
- IsValidEnumValue and MustBeValidEnumValue now do not allocate memory when checking a flags enum value for validity (in .NET Standard 1.0 and 2.0 as well as .NET 4.5)

Breaking Changes:
--------------------------------
- EnumInfo<T>.EnumConstants now returns ReadOnlyMemory<T> in .NET Standard 2.0 and .NET 4.5
- new dependencies: System.Runtime.CompilerServices.Unsafe (.NET Standard 1.0 and 2.0 as well as .NET 4.5) and System.Memory (.NET Standard 2.0 and .NET 4.5)

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
7.0.0 1,753 7/13/2019
6.2.0 13,382 2/12/2019
6.1.0 1,316 11/18/2018
6.0.0 188 11/10/2018
5.0.1 15,653 8/3/2018
5.0.0 249 7/29/2018
4.0.0 254 7/10/2018
3.5.0 657 9/3/2017
3.4.0 240 8/27/2017
3.3.0 413 8/15/2017
3.2.0 240 8/13/2017
3.1.0 238 8/6/2017
3.0.0 274 7/23/2017
2.0.0 523 5/29/2017
1.3.0 288 4/12/2017
1.2.1 451 11/16/2016
1.2.0 449 7/25/2016
1.1.0 343 6/2/2016
1.0.0 315 6/1/2016
0.2.0 322 3/29/2016
0.1.0 315 3/23/2016