I researched the use of a condition framework to verify data instead of
if(cond) throw new SomeException();
SomeFramework.MakeSure(cond);
In the end my choice is to use either the CodeContract
or CuttingEdge.Conditions
frameworks.
I can not decide which framework to use. I can tell you that what I don't like about the 'CodeContract' framework is that you have to install the extra msi
in order to use it and the options you need to choose; not that its bad, but it feels not natural. (And of course its still under MS research.)
What do you think?