A lightweight, fast, and analyzers-backed guard/validation library for .NET8.0, with ASP.NET Core extensions and Roslyn analyzers.
dotnet add package GuardXusing GuardX;
Guard.Against.Null(arg, nameof(arg));
Guard.Against.NullOrWhiteSpace(name);
Guard.Against.OutOfRange(value,1,10);// Example placeholder - package `GuardX.AspNetCore`
services.AddGuardX();Enable additional diagnostics by referencing GuardX.Analyzers as an analyzer in your project.
<ItemGroup>
<PackageReference Include="GuardX.Analyzers" Version="[latest]" PrivateAssets="all" />
</ItemGroup>- Fork the repo and create a feature branch from
dev - Run
dotnet testand ensure coverage stays healthy - Submit a PR to
dev. We use GitHub Actions for CI and Codecov for coverage
- Create a tag
vX.Y.Zonmainand push it. CI will packsrc/GuardXand publish to NuGet.org
Daniel WOAGOU (@daniwxcode)