Browse Blog Posts by Tags

Showing related tags and posts for the Blogs application. See all tags in the site
Sorry, but there are no more tags available to filter with.
  • Code contract is out

    Check the announcement here and the site is here .
    Posted to LA.NET [EN] by luisabreu on Wed, Feb 25 2009
    Filed under: Filed under: ,
  • Contract reference assemblies

    If you look closely at your bin folder, you’ll see that besides getting your project’s assembly, you’ll also have another assembly with the your_Assembly_name.Contracts.dll name. This assembly is known as the contract reference assembly and it only has the public “interface” of the types defined on your...
    Posted to LA.NET [EN] by luisabreu on Wed, Nov 19 2008
    Filed under: Filed under: ,
  • Code contracts: the missing methods

    In the last posts, I’ve been talking extensively about Code Contracts . If you’re a reader of this blog, you know that I’m hooked on it. I’ve just been reviewing the previous posts and I’ve noticed that I didn’t mention the Assert and Assume methods. Both are used for testing state and  assumptions...
    Posted to LA.NET [EN] by luisabreu on Tue, Nov 18 2008
    Filed under: Filed under: ,
  • Code Contracts and runtime rewriting

    Today we’re going to keep looking at Code Contracts . Until now, I’ve been concentrating essentially in presenting its use and mentioning how great it is to have static analysis (ie, have something that goes through your code at compile time and detects several places which might breaking existing contracts...
    Posted to LA.NET [EN] by luisabreu on Wed, Nov 12 2008
    Filed under: Filed under: ,
  • Using quantifiers on Code Contracts

    Code Contracts also supports are quantifiers (with several limitations, as we’ll see). This means that you can check a predicate against elements in a collection or interval. You can use the ForAll method for running a predicate over several elements maintained on an collection or interval. The Exists...
    Posted to LA.NET [EN] by luisabreu on Sun, Nov 9 2008
    Filed under: Filed under: ,
  • Code Contracts and compatibility with existing code

    Before using Code Contracts , you’ll probably already written several lines of validation code for testing requirements on your methods. I’ll keep using the Person class to illustrate some code that you might have before using the Code Contracts library . So, in the past, you might have something like...
    Posted to LA.NET [EN] by luisabreu on Sat, Nov 8 2008
    Filed under: Filed under: ,
  • Adding Code Contracts to your interfaces

    [Update: I’ve changed the code so that the contract class implements the interface explicitly. This is required for getting static analysis. One more thing: the first release of the project has a bug and  even if you implement the interface explicitly, you won’t get static analysis.] One of the...
    Posted to LA.NET [EN] by luisabreu on Fri, Nov 7 2008
    Filed under: Filed under: ,
  • More on Code Contracts: out parameters and field access on preconditions

    In this post we’ll keep looking at how Code Contracts can really help you improve your code. Today, we’ll see how one can use fields and out parameters in contracts. Lets start with fields. Ok, the title is a little misleading…you can use fields in your contract. But what happens when you need to define...
    Posted to LA.NET [EN] by luisabreu on Thu, Nov 6 2008
    Filed under: Filed under: ,
  • Code Contracts: don’t use the overloads that receive a string

    In my first post about Code Contracts I’ve mentioned that in my machine static analysis wasn’t picking up those evident scenarios where the code was breaking the predefined contracts. Today I’ve got the confirmation on the PEX forum (which, btw, is the place where you should post your questions regarding...
    Posted to LA.NET [EN] by luisabreu on Thu, Nov 6 2008
    Filed under: Filed under: ,
  • More on code contracts: checking return values and old values

    Today I’ll keep writing about the new Code Contracts framework and we’ll see how we can use the write contracts that validate method return values and “old” values. Lets start with method return values… As you might expect, you’re able to refer to return values on your postconditions. To show you the...
    Posted to LA.NET [EN] by luisabreu on Thu, Nov 6 2008
    Filed under: Filed under: ,
  • More on Code Contracts

    Yesterday I was really excited after finding out that we’ll finally have a library for performing Design By Contract verifications on our code. Ok, the runtime validations could already be simulated by writing some code (I’ve already written several helpers classes in my current applications), but the...
    Posted to LA.NET [EN] by luisabreu on Wed, Nov 5 2008
    Filed under: Filed under: ,
  • Code contracts are here!

    Ok, I know I’ve asked for design by contract on C# and that didn’t made it into C# 4.0. However, I’ve just discovered something even better (especially if you’re a VB programmer): we’re getting support for it on the form of a library and some msbuild tasks that are able to perform static and runtime...
    Posted to LA.NET [EN] by luisabreu on Tue, Nov 4 2008
    Filed under: Filed under: ,
Page 1 of 1 (12 items)