25 August 2009 0 Comments

Data Deserialization Order

Why are the members of a data contract expected in a particular order in order to be read? The order of members is frequently used to build an expectation of what element might be appearing next. Knowing the possible order of data instead of potentially having to accept data in any order tends to make deserialization both faster and cheaper

21 August 2009 0 Comments

Code Contracts CLR Inside Out Article [Melitta Andersen]

In the August 2009 issue of MSDN Magazine , we have a CLR Inside Out article on the BCL’s experience with adding code contracts to the BCL .  It includes both an overview of the feature, as well as a few best practices we came up with as we went along.  For regular readers of this blog who have read the previous posts on code contracts and followed all of the links, this article probably won’t provide much new information with the overview, but some of the tips will likely be useful if you plan on using code contracts. As always, comments and questions are welcome here or on the Code Contracts forum

17 August 2009 0 Comments

WCF 4: AddDefaultEndpoints

Note: Cross posted from Sajay . Permalink Here is another little goodie we have which will help in reducing configuration. You can use the ServiceHostBase.AddDefaultEndpoints which will pretty much probe your service implementation for contracts and expose them as shown below.

15 July 2009 0 Comments

CLR 4: Making the AssemblyResolve event more useful

  In the introductory post on CLR Binder (‘ Understanding the Binder – Part 1 ’), we listed the set of steps that the CLR Binder follows, in order to locate an assembly and bind to it. On reading this, an obvious question comes to mind. What happens when all of these steps fail to locate the assembly

14 July 2009 0 Comments

Local messaging in SL 3 is nice, but…

Why is there no inherent serialization support for normal object graphs like in the attached example. The attached example is a basic page with two simple vector caclulators. Entering a vector dimension of three in the part named “Add”, filling out a few values, press calculate, you get:  Press “Send arguments” and the arguments are send to the other app.

6 July 2009 0 Comments

Environment Independent Versions

In the recommendation for designing versionable contract names , there was no mention of the deployment environment of the service. Should this be included by, for example, having different namespaces for development and production deployments of the service? I generally don’t recommend including the deployment environment in the contract name.

1 July 2009 0 Comments

CLR Inside Out – Building Tuple

The new installment of the “CLR Inside Out” column in MSDN magazine is now available on line.   This month we have an article from Matt Ellis on Building Tuple .   It provides one example of how a new type makes it into the base class libraries