By tag: Contracts
0
kicks
An introduction to Code Contracts in .NET 4.0
NET 4.0 sees the introduction of Code Contracts. Code Contracts allow the developer to specify rules and "assumptions on your code in the form of pre-conditions, post-conditions and object invariants" (in the words of DevLabs).
0
kicks
Code Contracts: Validating state with Assert, Assume, ForAll, Exists
Taking a look at how to utilize some additional features in the Code Contracts library to validate the state of our application.
We are going to focus our efforts here to learn how to use Assert and Assume to validate a given value in our code. We will also learn how to use ForAll and Exists, whi...
0
kicks
Exploring Code Contracts: Taking a look at Pre/Post Conditions
Taking a look at the new Code Contracts library which is out of MS Research and will be part of .Net 4.0/Vs2010.
Contracts allow for many different ways to perform language agnostic code validation and in this episode we are going to focus on how to setup pre and post condition validation.
0
kicks
Code Contracts Primer – Part 2: Handling Legacy Code
So the one of the first questions that many people ask when talking about using the Code Contracts library is ‘what do I do about my legacy code?’. Asking this is a very valid question. If your team has already subscribed to the design-by-contract or fail-fast concepts then maybe you have already ...
0
kicks
ChannelFactory
Our application is huge; we expect it to consist of dozens of Web services each with dozens of methods. Anticipating many years of evolution, maintenance, and service packs, we immediately asked questions like “How will we maintain shape changes to service contracts?”