ardalis/GuardClauses
A simple package with guard clause extensions. observed · 2026-10-07
Health v2 · maintenance only
66/100
- Activity 95
- 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-10-21. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3325
- days_rel: n/a
- days_push: 34
- n_releases_24m: 0
Adoption not part of the score
3314 stars · 295 forks observed · 2026-10-07
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-10-07 · da9e9f1146d8
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| ardalis/GuardClauses | main | 66 |
For agents
markdown · JSON · MCP: product_card(name="ardalis/GuardClauses")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem