From cb87ede1497f8e869bb420270c2ab0cf952bad71 Mon Sep 17 00:00:00 2001 From: Kenny Pflug Date: Sun, 27 Oct 2024 19:30:57 +0100 Subject: [PATCH] docs: update readme and package release notes for v12.0 Signed-off-by: Kenny Pflug --- Code/Light.GuardClauses/Light.GuardClauses.csproj | 12 ++++++------ Code/Version.props | 2 +- README.md | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Code/Light.GuardClauses/Light.GuardClauses.csproj b/Code/Light.GuardClauses/Light.GuardClauses.csproj index 6d29b41..2d7d6dc 100644 --- a/Code/Light.GuardClauses/Light.GuardClauses.csproj +++ b/Code/Light.GuardClauses/Light.GuardClauses.csproj @@ -9,7 +9,7 @@ Kenny Pflug enable true - Copyright © Kenny Pflug 2016, 2023 + Copyright © Kenny Pflug 2016, 2024 12 true true @@ -26,12 +26,12 @@ true README.md -Light.GuardClauses 11.0.0 +Light.GuardClauses 12.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 +- Added support for NotNullAttribute +- Added Range.InclusiveBetween and Range.ExclusiveBetween to create Range instances even more easily +- breaking: String assertions that use a StringComparison parameter now throw an ArgumentException instead of forwarding an invalid value to the exception factory @@ -39,7 +39,7 @@ Light.GuardClauses 11.0.0 - + diff --git a/Code/Version.props b/Code/Version.props index 0bedeec..1914f2f 100644 --- a/Code/Version.props +++ b/Code/Version.props @@ -1,5 +1,5 @@  - 11.0.0 + 12.0.0 \ No newline at end of file diff --git a/README.md b/README.md index fae6215..dc3ed06 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ **A lightweight .NET library for expressive Guard Clauses.** [![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://github.com/feO2x/Light.GuardClauses/blob/master/LICENSE) -[![NuGet](https://img.shields.io/badge/NuGet-11.0.0-blue.svg?style=for-the-badge)](https://www.nuget.org/packages/Light.GuardClauses/) -[![Source Code](https://img.shields.io/badge/Source%20Code-11.0.0-blue.svg?style=for-the-badge)](https://github.com/feO2x/Light.GuardClauses/blob/master/Light.GuardClauses.SingleFile.cs) +[![NuGet](https://img.shields.io/badge/NuGet-12.0.0-blue.svg?style=for-the-badge)](https://www.nuget.org/packages/Light.GuardClauses/) +[![Source Code](https://img.shields.io/badge/Source%20Code-12.0.0-blue.svg?style=for-the-badge)](https://github.com/feO2x/Light.GuardClauses/blob/master/Light.GuardClauses.SingleFile.cs) [![Documentation](https://img.shields.io/badge/Docs-Wiki-yellowgreen.svg?style=for-the-badge)](https://github.com/feO2x/Light.GuardClauses/wiki) [![Documentation](https://img.shields.io/badge/Docs-Changelog-yellowgreen.svg?style=for-the-badge)](https://github.com/feO2x/Light.GuardClauses/releases) @@ -60,7 +60,7 @@ public class ConsoleWriter public void SetMovieRating(Guid movieId, int numberOfStars) { movieId.MustNotBeEmpty(); - numberOfStars.MustBeIn(Range.FromInclusive(0).ToInclusive(5)); + numberOfStars.MustBeIn(Range.InclusiveBetween(0, 5)); var movie = _movieRepo.GetById(movieId); movie.AddRating(numberOfStars); @@ -114,7 +114,7 @@ Light.GuardClauses is available as a [NuGet package](https://www.nuget.org/packa - **dotnet CLI**: `dotnet add package Light.GuardClauses` - **Visual Studio Package Manager Console**: `Install-Package Light.GuardClauses` -- **Package Reference in csproj**: `` +- **Package Reference in csproj**: `` Also, you can incorporate Light.GuardClauses as a **single source file** where the API is changed to `internal`. This is especially interesting for framework / library developers that do not want to have a dependency on the Light.GuardClauses DLL. You can grab the default .NET Standard 2.0 version in [Light.GuardClauses.SingleFile.cs](https://github.com/feO2x/Light.GuardClauses/blob/master/Light.GuardClauses.SingleFile.cs) or you can use the [Light.GuardClauses.SourceCodeTransformation](https://github.com/feO2x/Light.GuardClauses/tree/master/Code/Light.GuardClauses.SourceCodeTransformation) project to create your custom file. You can learn more about it [here](https://github.com/feO2x/Light.GuardClauses/wiki/Including-Light.GuardClauses-as-source-code).