Skip to content

Commit

Permalink
docs: update readme and package release notes for v12.0
Browse files Browse the repository at this point in the history
Signed-off-by: Kenny Pflug <[email protected]>
  • Loading branch information
feO2x committed Oct 27, 2024
1 parent 8b7d8f7 commit cb87ede
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Code/Light.GuardClauses/Light.GuardClauses.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Company>Kenny Pflug</Company>
<Nullable>enable</Nullable>
<IsAotCompatible Condition="'$(TargetFramework)' == 'net8.0'">true</IsAotCompatible>
<Copyright>Copyright © Kenny Pflug 2016, 2023</Copyright>
<Copyright>Copyright © Kenny Pflug 2016, 2024</Copyright>
<LangVersion>12</LangVersion>
<TreatWarningsAsErrors Condition="'$(Configuration)' == 'Release'">true</TreatWarningsAsErrors>
<IsPackable>true</IsPackable>
Expand All @@ -26,20 +26,20 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>
Light.GuardClauses 11.0.0
Light.GuardClauses 12.0.0
--------------------------------

- Light.GuardClauses now targets .NET 8 and is AOT-compatible
- breaking: EnumInfo&lt;T&gt; 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
</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" Condition="'$(TargetFramework)' != 'net8.0'" />
<PackageReference Include="System.Memory" Version="4.5.5" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Code/Version.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>11.0.0</Version>
<Version>12.0.0</Version>
</PropertyGroup>
</Project>
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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**: `<PackageReference Include="Light.GuardClauses" Version="11.0.0" />`
- **Package Reference in csproj**: `<PackageReference Include="Light.GuardClauses" Version="12.0.0" />`

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).

Expand Down

0 comments on commit cb87ede

Please sign in to comment.