Skip to content

UbiquityDotNET/Argument.Validators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Argument.Validators

Common annotation and argument validation support

NOTE v7.00 changed the name and namespace for these validators to conform to common standards for the Ubiquity.NET organization.

Nuget

Nuget

Build Status

CI-Build Release-Build

Examples

using namespace Ubiquity.NET.ArgValidators
//...
public static object Load( string path, object foo, int bar )
{
    path.ValidateNotNullOrWhiteSpace( nameof( path ) );
    foo.ValidateNotNull( nameof( foo ) );
    bar.ValidateRange( 3, 5, nameof( bar ) );

    //...
}

Complete documentation on all validators is available online