A library of extension methods to validate arguments.
Please follow the instruction presented here.
// 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.
Feel free to open Pull Requests with features or open any issue with feature request or bug.