Code Contracts for Windows Communication Foundation (WCF)July 11th, 2011
FiledJuly 11th, 2011Abstract—Code contracts allow the specification of precon- ditions, postconditions and invariants for .NET interfaces and classes. Code contracts not only perform constraint checking at runtime, but also provide tools for static code analysis and documentation generation. WCF is another .NET technology supporting the creation and deployment of distributed services such as Web services. Currently, WCF services cannot be equipped with code contracts. Though a combination of both technologies would bring additional expressive power to WCF and Web services, there does not exist a solution yet. In this paper, we present a novel approach that brings code contracts to WCF. Our solution combines standard technologies such as WSDL and WS-Policy. The feasibility of the approach has been demonstrated by a proof of concept implementation.