ardalis/GuardClauses
A simple package with guard clause extensions. observed · 2026-08-28
Health v2 · maintenance only
67/100
- Activity 99
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3277
- days_rel: 702
- days_push: 9
- n_releases_24m: 1
Adoption not part of the score
3314 stars · 296 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A small, extensible C# library providing guard clause extension methods for fail-fast argument validation. It offers checks like null, empty, out-of-range, and format validation, and can be extended with custom guards.
Use cases
- validate method arguments in c#
- fail fast on null or empty inputs
- add guard clauses to dotnet constructors
- validate argument ranges and formats
- throw notfound exceptions for id lookups
- write cleaner code without verbose if-throw blocks
When to choose
- you write .NET code and want concise, expressive argument validation
- you follow clean architecture or clean code practices and want a lightweight dependency
- you need extensible guard clauses with custom checks
When to avoid
- you need full data annotation or fluent validation of complex object graphs
- you are not working in the .NET ecosystem
Facets
library · maturity stable
error-handling developer-tools developer-tools programming-languages dotnet cross-platform guard-clauses clean-code design-patterns fail-fast input-validation nuget
1 source
- readme: https://github.com/ardalis/GuardClauses · fetched 2026-08-28 · da9e9f1146d8
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| ardalis/GuardClauses | main | 67 |
For agents
markdown · JSON · MCP: product_card(name="ardalis/GuardClauses")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem