Skip to content

Releases: feO2x/Light.GuardClauses

14,0.0 Polyfill Compatibility

26 Nov 04:48
5d66991

Choose a tag to compare

Light.GuardClauses 14.0.0

  • Single-Source-File: use NET8_0_OR_GREATER instead of NET_8_0 to play nicely with newer .NET versions
  • Breaking Change: Check.Contains(string, string, System.StringComparison) now exists in Light.GuardClauses.FrameworkExtensions to avoid conflict with other polyfill libraries

What's Changed

Full Changelog: v13.1.0...v14.0.0

🚀 13.1.0 ImmutableArray<T> support

21 Jul 07:02
f634a2e

Choose a tag to compare

Light.GuardClauses 13.1.0

  • new assertions for ImmutableArray<T>: MustNotBeDefaultOrEmpty, MustHaveLength, MustHaveLengthIn, MustHaveMinimumLength, MustHaveMaximumLength
  • new dependency: System.Collections.Immutable

What's Changed

  • Issue 114 must not be default or empty for immutable array by @feO2x in #115
  • MustNotContain for immutable array by @feO2x in #122
  • MustHaveLength for immutable array by @feO2x in #123
  • Issue 118 must have length in for immutable array by @feO2x in #124
  • MustContain for immutable array by @feO2x in #125
  • MustHaveMaximumLength for immutable array by @feO2x in #126
  • MustHaveMinimumLength for immutable array by @feO2x in #127
  • Release 13.1.0 by @feO2x in #128

Full Changelog: v13.0.0...v13.1.0

13.0.0 Approximately file extension

09 Mar 19:26
62a273b

Choose a tag to compare

Light.GuardClauses 13.0.0

  • new assertions: IsApproximately<T>, IsLessThanOrApproximately<T>, IsGreaterThanOrApproximately<T>, MustBeApproximately, MustNotBeApproximately, MustBeLessThanOrApproximately, MustBeGreaterThanOrApproximately, IsEmptyOrWhiteSpace for Span<T> and Memory<T>, IsFileExtension
  • email regex is now precompiled on .NET 8 and newer, the regex is compiled at runtime on .NET Standard 2.0 and 2.1
  • breaking: Throw class is now located in new namespace Light.GuardClauses.ExceptionFactory
  • breaking: Throw members regarding spans now only support ReadOnlySpan<T>, in keyword was removed for these members
  • breaking: IsApproximately now uses less-than-or-equal-to operator (<=) instead of less-than operator (<)
  • breaking: Email regex is less strict and support additional patterns like domains with more than 3 letters (e.g. .info or .travel)

What's Changed

  • Smaller files refactoring by @feO2x in #103
  • IsEmptyOrWhiteSpace for Span and Memory by @feO2x in #106
  • Optimize Email Regex by @feO2x in #107
  • IsFileExtension and MustBeFileExtension by @feO2x in #108
  • Updates to IsEmailAddress and MustBeEmailAddress by @feO2x in #109
  • Refactor: Throw class is now in own namespace called ExceptionFactory by @feO2x in #110
  • Generic IsApproximately and MustBeApproximately/MustNotBeApproximately by @feO2x in #111
  • Generic IsLessThanOrApproximately/IsGreaterThanOrApproximately by @feO2x in #112
  • v13.0.0 by @feO2x in #113

Full Changelog: v12.0.0...v13.0.0

12.0.0 Not Nothing

27 Oct 18:35
85b04d9

Choose a tag to compare

Light.GuardClauses 12.0.0

What's Changed

Full Changelog: v11.0.0...v12.0.0

11.0.0 Native AOT

16 Nov 13:23
9d994da

Choose a tag to compare

Light.GuardClauses 11.0.0

  • Light.GuardClauses now targets .NET 8 and is AOT-compatible
  • breaking: EnumInfo<T> no longer has the UnderlyingType property
  • In AOT scenarios, avoid the Type-related assertions, they are marked with the DynamicallyAccessedMembersAttribute

10.3.0 - Range.For

09 Oct 06:03
a067d91

Choose a tag to compare

Light.GuardClauses 10.3.0

  • Added Range.For to create range instances for valid collection indexes
  • Added GetCount extension method for IEnumerable<T> - this is a more optimized version of LINQ's Count extension method that also optimizes paths for IReadOnlyCollection<T> and string
  • thanks to @reima for the proposal and support

11.0.0-preview1 Native AOT

24 Sep 16:23

Choose a tag to compare

Pre-release

Light.GuardClauses 11.0.0-preview1

  • Light.GuardClauses now targets .NET 8 and is AOT-compatible
  • breaking: EnumInfo<T> no longer has the UnderlyingType property
  • In AOT scenarios, avoid the Type-related assertions, they are marked with the DynamicallyAccessedMembersAttribute

10.2.0 - Trimmed Strings and Approximate Floats

22 Sep 06:03
78f583f

Choose a tag to compare

Light.GuardClauses 10.2.0

  • Added IsLessThanOrApproximately and IsGreaterThanOrApproximately assertions for doubles and floats
  • Added IsTrimmedXXX and MustBeTrimmedXXX assertions for strings

10.1.0 - Support for JetBrains' NoEnumerationAttribute

06 Aug 19:45
5e3b2c2

Choose a tag to compare

Light.GuardClauses 10.1.0

  • added support for JetBrains' NoEnumerationAttribute - many thanks to Chris Donnelly (#82)

10.0.0 Support for CallerArgumentExpression

06 Dec 07:34

Choose a tag to compare

Light.GuardClauses 10.0.0

  • added support for CallerArgumentExpressionAttribute
  • Breaking change: the library is now built against .NET Standard 2.0 and .NET Standard 2.1