Configuration Property CodeRush Template

Posted on 31st January 2008 in CodeRush

I have been busy this week creating our company’s subscription service, more on that later.

As part of this I am integrating with PayPal to enable recurring payments.  The PayPal service has a number of configuration options to work with, merchant IDs, IPN handler locations, PDT handler locations, API locations etc.

I started writing my own configuration section handler for PayPal and became bored writing the properties, so I came up with these templates for CodeRush.  We all need something to relieve the boredom of repetitive tasks: –

Template Name : scp

[ConfigurationProperty("«Caret»«FieldStart(Setting Name)»«Link(settingName)»«FieldEnd»", «Field(Optional, OptionalSettings)»)]
public object «Field(Setting, Setting Name)»
    get {return base["«Link(settingName)»"];}
    set {base["«Link(settingName)»"] = value;}

Template Name : scp?Type?

[ConfigurationProperty("«Caret»«FieldStart(Setting Name)»«Link(settingName)»«FieldEnd»«BlockAnchor»", «Field(Optional, OptionalSettings)»)]
public «TypeLink(“«?Get(Type)»”)» «Field(Setting, Setting Name)»
    get {return («TypeLink(“«?Get(Type)»”)»)base["«Link(settingName)»"];}
    set {base["«Link(settingName)»"] = value;}

Typing scps<space> will expand with the following results: –

[ConfigurationProperty("settingName", Optional)]
public string Setting
    get {return (string)base["settingName"];}
    set {base["settingName"] = value;}

Typing scp<space> will expand with the following results: -

[ConfigurationProperty("settingName", Optional)]
public object Setting
    get {return base["settingName"];}
    set {base["settingName"] = value;}

In both cases the “settingName” string will be linked, changing one will change all.  Also the first “settingName” will be highlighted.  Once you are done changing this string hitting <enter> will take you to and highlight Optional, hitting <enter> again once you are done with the optional values will place your cursor after the }.  In the case of scps both of the string types will be linked, changing one will change both.

If anyone is interested in understanding these templates in more detail please let me know.

comments: Comments Off

Preparing for Doppler v4 Iteration 1

Posted on 18th January 2008 in Doppler, Open Source Software

The Doppler Open Source Software project began in October 2007, when the source code for Doppler was released on codeplex, following this this post on DopplerRadio.

I joined the project not long after this and started looking forward to working on the source code.  Since then I have fixed a few problems in the current development version and actually checked source in.  This probably doesn’t seem like a big achievement, however this is my first OSS and I am proud to be contributing.

The current goal for the project is to finish Doppler 3 CTP and make it stable enough to release.  We seem to be getting rid of problems at a reasonable rate and aim to have this task complete by the end of January 2008.

In the middle of December we had a Live Meeting to discuss the future of the project, the roles people will play and what we want to get out of the time working with the code base.

It was decided that we would try and re-write the application using as much of the technology provided in the .net 3.5 stack as possible.  This would include: -

I am sure that there are some areas that I have missed, this is what I can remember right now.

We are going to attempt to use a Test Driven Design approach with Behaviour Driven Development style specifications to drive the project.  The BDD documentation will provide a set of user stories that we will attempt to prioritise and split into iterations.  I am not sure how well this is going to work on an OSS project, but it will be interesting to see.

I believe that one of the important decisions made was that anything used during the development of Doppler v4 will be available freely, or at least have a free version available.  The tools that are in use right now, that I know of, are :-

TeamCity and NCover are both commercial products; however JetBrains offer a free professional version of the TeamCity and Gnoso still make some beta versions of NCover available for free.  Both companies also provide a free license for OSS projects.  We are currently using the free professional version of TeamCity, with the intention of approaching them for an OSS license shortly.  Gnoso have already granted us an OSS project license for professional version of NCover and NCoverExplorer.

The reason for choosing NUnit instead of the build in testing features of Visual Studio 2008 was two-fold: -

  1. Visual Studio 2008 Express editions do not support the Microsoft Test features.
  2. NUnit is familiar to several of the developers and is an excellent testing framework.

As I work with the Doppler project I am going to write about my experiences on here.  The first subject will be the setting up of a Continuous Integration process for the project.

comments: Comments Off

Testing Post From Windows Live Writer

Posted on 11th January 2008 in Uncategorized

This post is testing that I have installed and configured Windows Live Writer correctly for posting to my blog.

This is in preparation for my first post, which should be ready in a week or so.

I will be writing about my experience with setting up TeamCity and configuring it to interact with an OSS project, Doppler.

I will outline the steps taken to create an MSBuild file to run NCover and NCoverExplorer to produce coverage reports.  Hopefully by then I will have figured out how to make these reports appear as a tab inside the TeamCity build report.

comments: 2 »