CuttingEdge.Conditions is a library that helps developers to write pre- and postcondition validations in their .NET 3.5 code base. Writing these validations is easy and it improves the readability and maintainability of code.
This second beta has new functionality, some bug fixes and some breaking changes compared to the first release.New features
- Validation<T> class is now extendable. Users can now write their own entry point methods.
- An Otherwise<T> extension method is added. This allows users to throw alternative exception.
- Method overloads added for most primitive CLR types to increase performance. You could expect a 50% performance improvement on average when primitive types (int, short, double etc.) are validated.
- Extra 'IsTrue' and 'IsFalse' extension methods are added.
- An overload method added for every validation extension method in the framework that allows a user to supply an alternative description that will be used when throwing an exception.
- The 'IsOfType(Type)' didn't throw an exception when the validated argument was a null reference (Nothing in VB). This is fixed and an exception will now be thrown in this case. (this is a breaking change)
- Some minor fixes on the generated exception messages.
- The ArgumentName field of the Validator<T> class has been changes to a property. (This is a breaking change)
For any feedback regarding the project in general and this release in particular, please contact the author at his blog:
This release is provided without any warranty. Please note that this is a beta release and that future releases may be incompatible to this release, like this release is incompatible with the first release.