Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 629 Bytes

README.md

File metadata and controls

28 lines (16 loc) · 629 Bytes

Ensure

A library of extension methods to validate arguments.

Installation

Please follow the instruction presented here.

Usage

// String
string.Empty.EnsureNotNullOrEmpty(); // Throws ArgumentNullException

// Object

object aObject = null;
aObject.EnsureNotNull(); // Throws ArgumentNullException

aObject.Ensure(o => false /* A condition */, "A error message"); // Throws ArgumentException

For a detailed usage overview please see the tests.

Contribution

Feel free to open Pull Requests with features or open any issue with feature request or bug.