Lambda Functions for Design By Contract  This is sadly not one
of those blog posts where I show you what I have managed to
achieve. Instead it’s one where I ask you if you have a solution
for what I am after.  When I was at university, my professor
convinced me that the benefits of design by contract were worth
the cost of the implementation. In every language that I have
worked with ever since, I have implemented some sort of veneer
over the top of the language to enable design by contract. I’ve
used all sorts of code generators or AOP systems to do it for
me. As you may have seen from my last post, I’ve been on the WCF
Masterclass with Juval Lowy, and I’ve been inspired by the
pretty extensibility model of WCF to give DBC in C# another
stab.  WCF provides class construction behavior that is nicely
extensible through the use of attributes. If an attribute, for
example, derives from IServiceBehaviour, then WCF will  run a
method on the attribute, passing in the object that the
attribute was attached to. This