CuttingEdge.Conditions v1.0

Rating: No reviews yet
Downloads: 680
Released: Aug 27, 2009
Updated: Dec 1, 2009 by dot_NET_Junkie
Dev status: Stable Help Icon

Recommended Download

Application CuttingEdge.Conditions Runtime Library v1.0.zip
application, 677K, uploaded Aug 28, 2009 - 376 downloads

Other Available Downloads

Source Code CuttingEdge.Conditions Source Code v1.0.zip
source code, 917K, uploaded Aug 27, 2009 - 251 downloads
Documentation CuttingEdge.Conditions.chm
documentation, 684K, uploaded Dec 1, 2009 - 53 downloads

Release Notes

CuttingEdge.Conditions is a library that helps developers to write pre- and postcondition validations in their C# 3.0 and VB.NET 9 code base. Writing these validations is easy and it improves the readability and maintainability of code.

This first stable release has had a major face lift and several minor bug fixes. The API has changed considerably and therefore this release is both binary and code incompatible with the previous beta. Great change is the possibility to run CuttingEdge.Conditions on machines that do not have .NET 3.5 installed. While the assembly itself is still dependent on System.Core (.NET 3.5), users can safely add it to their .NET 2.0 projects (as long as the C# 3.0 or VB9 compilers are used).

General changes
  • CuttingEdge.Condition source code is now licensed under the MIT License.

Breaking changes
  • Removed extension method behavior of Requires() and Ensures() methods. For more information on this change, see A Controversial Change in CuttingEdge.Conditions.
  • The type Validator<T> was renamed to ConditionValidator<T>. The name Validator<T> was too general and didn't exactly describe it's intend.
  • Otherwise<T> methods removed from ConditionValidator<T>. For more information on this change, see Removing Otherwise method from CuttingEdge.Conditions.
  • Changed extensibility of ConditionValidator<T>. Throw has been renamed to ThrowException. BuildException method overloads have been removed. This change makes extending the library more consistent and powerfull.
  • One overload of entry point method Ensures() has been removed. The overload Condition.Ensures<T>(T, string, string) has been removed. The overload was redundant.

Bug fixes
  • Behavior of Contains, ContainsAll, and ContainsAny overloads fixed. The overloads of the Contains, ContainsAll, and ContainsAny methods for collections had inconsistent behavior. While some overloads used the ICollection<T>.Contains or IList.Contains method of the validated collection, others iterated the collection itself to determine whether a collection contained the specified value. This resulted in different behavior on some collections that did not use default equality. This fix came with some costs. Using those methods on ordered sets (like HashSet<T> and SortedList<T>) is now slower than before.
  • Dependencies on .NET 3.5 removed. CuttingEdge.Conditions can now be successfully be run on machines that do not have .NET 2.0 installed.
  • Evaluate(null) threw a NullReferenceException. When the ValidationExtensions.Evaluate<T>(Expression<Func<T, bool>>) overload was called with a null reference for the Expression argument, the method threw a NullReferenceException.
  • StackOverflowException was thrown when self-referencing collections were supplied.
For the complete list of changes, view the changes.txt in the Source Code browser.

For any feedback regarding the project in general and this release in particular, please go to the Discussions tab, or contact the author at his blog: Or use the author's codeplex profile page:

Reviews for this release

No reviews yet for this release.