Found 41 packages
Add null checks.
Argument validation like: Guard.NotNull, Guard.NotNullOrEmpty, Guard.NotNullOrWhiteSpace, Guard.Condition en Guard.HasNoNulls.
The only argument validation file you need, with full refactoring support and strong-typing. Examples: Guard.NotNull(() => value, value) Guard.NotNullOrEmpty( () => stringValue, stringValue)
Guard and Validator library. Example: Guard.That(arg1).IsNotNull().GreaterThan(100); Throws an exception if conditions are not met. Supports the ability to get a list of the failed conditions.
Automatic null check injection for runtime C# Nullable Reference Types (NRT) parameter/contract validation.
Deep fork of the Seterlund.CodeGuard library. Example: Guard.That(arg1).IsNotNull().GreaterThan(100); Throws an exception if conditions are not met.
.NET Core port of Seterlund.CodeGuard, a Guard and Validator library. Example: Guard.That(arg1).IsNotNull().GreaterThan(100); Throws an exception if conditions are not met. Supports the ability to get a list of the failed conditions.
Easily validate all public method arguments are not null
Guardian. Mostly of null values. An unobtrusive, lightweight, guard clause source code package: less than 300 lines of code. Should be used like this: Guard.Against.Null(() => parameter); May be extended like this: Guard.Against.Empty(() => collection); Possibly the best tool for the job. Providing the job is simple.
NullGuard automatically detects NullReferenceException and logs the exact property, method, and file using Roslyn and Reflection.
'DRY Guard Clauses for c#. Guard_claws provides DRY guard clauses for c# that look like this: Claws.NotNullNotBlank(() => test);
Guard and Validator library. Example: Guard.That(arg1).IsNotNull().GreaterThan(100); Throws an exception if conditions are not met. Supports the ability to get a list of the failed conditions.
Package Description
Interceptor for CodeCop that automatically validates if any non-optional method arguments are not null, or in case of strings also not empty.
The Diagnostics library provides classes that help checking incoming parameters of a method using the Fluent API or not, depending on what you prefer.
Basic input validation via the `Ensure`-class throws an `ArgumentException`, `ArgumentNullException` or other Exception types, if the conditions are not met. The second parameter `parameterName` from `Ensure.That(T value, string? parameterName = default!)` is optional and is automatically populated by .NET, based on the `CallerArgumentExpressionAttribute` functionality.
Arguments validation library. Example: Guard.NotNullOrEmpty(bar, "bar");
Helper functions to aid in argument validation for C# functions. Example Usage: Throw.IfNull(argument, nameof(argument)); Throw.IfNullOrEmpty(argument, nameof(argument));
Provides extension methods for the Guardian source code package.
Guard is a simple class which helps you validate arguments.