Presenting templates for int and string ValueObjects
Most ValueObjects that i have implemented were wrappers around an int or a string. Apart from the domain specific rules, there is a lot of repetitive work in implementing operator overloads, IEquatable, IComparable, … Thus i decided to create a couple of Item templates that generate this code (and related tests).
Simply save IntValueObject.zip and StringValueObject.zip under %My Documents%\Visual Studio 2005\Templates\ItemTemplates and click on “Add New Item” in your project:
Add the bottom of the dialog you can choose one of the templates:
Here is the result of adding an International Standard Book Number class: