24 packages tagged with “preconditions”
Code Contracts and common functionalities used by other PostSharp pattern libraries. An official PostSharp pattern library.
A simple library that facilitates runtime checks of code and allows to define preconditions and invariants within a method.
A lightweight .NET library for expressive Guard Clauses.
Preconditions provide convenience static methods that help to check that a method or a constructor is invoked with proper parameter or not. In other words it checks the pre-conditions.
Library for easy fluent assertions
Validation library inspired by the concepts of Secure by Design, by Dan Bergh Johnsson, Daniel Deogun, and Daniel Sawano (MEAP 2019 Manning Publications).
A fluent assertion library for F#.
Provides static classes for representing program contracts as preconditions in a way that's compatible with System.Diagnostics.Contracts.
☑ Require Expressions - A pre-condition checks library 📦 for .Net via extensions methods on types.
This library, part of the OpinionatedFramework, offers a set of robust tools for enforcing preconditions, postconditions, and invariants in your .NET code. It's designed to boost code reliability and maintainability by offering a fluent, readable way to handle validation tasks.
Simple and lightweight C# library to ease arguments checks. Inspired by lecaillon preconditions library and jskeet preconditions classes. Preconditions contains Check class as simple wrapper over the ArgumentException and ArgumentNullException classes.
Provides functionality for creation of both synchronous and asynchronous generic guard clauses with custom preconditions and already contains implementation of basic ones for Collections, Enums, Strings, Objects and Numeric types.
Provides extension methods for both synchronous and asynchronous guard clauses for generic types, as well as for Enums, Objects, Collections, Strings, and various numeric types encapsulated in 'SafeContainer'.
FluentEnforce provides fluent API for handling unexpected errors with predefined validations. Features flexible custom validations enabling clean and readable precondition checks.
Package Description
Fluent API for code contract validation supporting multiple data types (int, long, double, decimal, float, string, object). Provides chainable guards with readable syntax for enforcing preconditions and business rules with clear error messages.
Fluent, chainable runtime assertions for preconditions, invariants, and state checks — with CallerArgumentExpression support for clear failure messages. Zero dependencies.
Guard clause library for .NET — null checks, range validation, domain guards, and predicate-based assertions.
Noundry.Guardian is a lightweight, high-performance library providing guard clauses for validating method parameters and ensuring defensive programming practices in .NET applications.
The package provides a lightweight, fluent API for runtime validation of objects and conditions. This library helps ensure that parameters meet expected conditions before execution, reducing boilerplate code for argument validation.