This project is read-only.
1
Vote

Guard class for input validation

description

A new static Guard class capable of handling input validation. For instance:

public void Foo(Contact contact)
{
Guard.ArgumentNullException(contact, "contact");
}

This would then throw an ArgumentNullException with the ParameterName property set to "contact" if the contact instance was null.

This class should be put into the new assembly: EnterpriseLibraryExtensions.Utilities in namespace EnterpriseLibraryExtensions.Utilities.ParameterValidation

comments