Using an enum type with WCF services
I recently started to work with Windows Communication Foundation and one of the first problems I did run into was how to use enum type in WCF. This is a small example of a data contract and a service...
View ArticleHow to isolate DateTime.Now in unit testing
When writing unit tests for codes that is using DateTime.Now you will find yourself in a situation where you can’t automate functionality that are dependent on the time since the time is changing...
View ArticleMessage box that can center on parent form
When using the built in MessageBox class to show message you are not able to center the dialog based on the parent form. This leads to that the dialog normaly popup in the center of the screen even if...
View ArticleHow to isolate Directory.Exists in unit testing using disposable pattern
Earlier i wrote a blog post about isolating DateTime.Now with disposable pattern. Here is a little more advance example for the static method Directory.Exists. So here is the simple example of product...
View ArticleOpen sourced some of my projects
I recently decided to open soruce some of my projects. You can find them under Projects on the blog. DiveBuddy Planner http://divebuddyplanner.codeplex.com Is decompression planning application for...
View ArticleFree options for Reflector (.NET decompiler)
After Reflector did change their licensing so it was no longer free to use I did stick around for a long time on an old version of Reflector. The time have now come to find an replacement for...
View ArticleGet all iteration paths in TFS programtically
A common way to organize work items in TFS is to assign them to different iterations. I’m using this with the scum model where every sprint corresponds to one iteration. So how can we get all iteration...
View ArticleHowTo update appsettings programmatically
Recently I was writing functional test for an application that read settings from the appsettings element in App.Config. The problem was that the application under test was expecting to react different...
View ArticleSystem.UnauthorizedAccessException: Access to the path is denied when using...
During a recent deployment to production environment we started to get System.UnauthorizedAccessException on places we hade not seen it before. After some debugging a pattern appeared. The problem is...
View ArticleCode challenge from lantmateriet.se
Yesterday I found a code challenge on http://www.lantmateriet.se/knackkoden that I decide to take a look on. We first need to decode the base 64 encoded text to get the actual instructions. Problem Gör...
View Article
More Pages to Explore .....