Skip to content

Releases: feO2x/Light.GuardClauses

.NET Analyzer Support

06 Dec 10:18

Choose a tag to compare

Light.GuardClauses 9.0.0

  • added support for .NET Analyzers / FxCopAnalyzers via ValidatedNotNullAttribute.
  • Breaking change: simplified parameter list of Throw.EmptyCollection

\n or \r\n?

27 May 15:12
5278d1d

Choose a tag to compare

Light.GuardClauses 8.1.0

  • added IsNewLine and MustBeNewLine
  • fixed warnings about incorrect NRT use in IEqualityComparer<T> implementations

Missing NRTs

26 Mar 09:34
1f82bd4

Choose a tag to compare

Light.GuardClauses 8.0.1

  • fixed missing NullableReferenceType indicators in URI assertions and IsSameAs / MustNotBeSameAs, as well as Throw.SameObjectReference

NRTed

25 Mar 21:09
f472baf

Choose a tag to compare

Light.GuardClauses 8.0.0

  • added support for Nullable Reference Types

Breaking Changes:

  • Removed support for older frameworks (.NET Standard 2.0 and .NET Core App 3.0 are supported)

Spanified!

13 Jul 20:29
4651e70

Choose a tag to compare

Light.GuardClauses 7.0.0

  • added length assertions for Span<T> #63
  • added Check.InvalidArgument (thanks to Igor Rončević for his contribution - #64)
  • added new length assertions for strings #62
  • added IsApproximately for double and float #59
  • 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)

Late Birthday Present

12 Feb 22:19

Choose a tag to compare

  • added MustBeEmailAddress and IsEmailAddress (thanks to Johan Vergeer for his contribution)

Step right into it

18 Nov 11:02

Choose a tag to compare

Light.GuardClauses 6.1.0

  • Added support for .snupkg NuGet Symbol package
  • Added static Range class to simplify the creation of Range<T> instances

Send DLL Hell to Heaven

10 Nov 13:09

Choose a tag to compare

Light.GuardClauses 6.0.0

  • Light.GuardClauses is now available as source code distribution with internal types (see Light.GuardClauses.SingleFile.cs in the top-level folder of the repository). You can also create you custom single source file by using the Light.GuardClauses.SourceCodeTransformation project.
  • Added string.Equals extension method which allows comparing strings ignoring the white space. Added corresponding MustBe and MustNotBe overloads for strings.
  • added char.IsLetter, char.IsDigit, char.IsLetterOrDigit, and char.IsWhiteSpace extension methods
  • fixed some typos in XML comments

Breaking changes:

  • Fixed typo in type: EqualivalentTypeComparer is now called EquivalentTypeComparer
  • IsValidEnumValue and MustBeValidEnumValue now use the new where T : Enum constraint of C# 7.3

MustNotBeDefault performance fix

03 Aug 12:11

Choose a tag to compare

MustNotBeDefault now does not allocate when T is resolved to a value type

Now it's clear

29 Jul 11:53

Choose a tag to compare

Breaking Changes

New logic for custom exception and messages:

  • When an exceptionFactory is provided, the resulting exception is always thrown, no matter what check fails inside an assertion
  • Messages are passed to all exceptions that are thrown by Light.GuardClauses

See #53 for details.