Parameter Validation Add-in (download)
Hello,
I finally had the time to finish the Parameter Validation
Add-in. This add-in allows you to perform method's parameters
validation in a automatic manner based on configuration file.
Take this as example:

In
the figure above, by calling the context menu, you'll see a new menu
item named "Validate Parameters". By clicking on it, the add-in will
validate the method's parameters based on a configuration file (we'll
get on that config file soon...).
So, the result will be something like this:

The generated code is based on a XML configuration file (check
this post),
and also based on a language extension plugin. In this case a C#
language plugin. Since I almost only use C# on .NET context, I will
only provide the C# plugin for code generation, however it's really
easy to create language extension plugins for other languages; let me
know if you are interested on doing this.
The following picture, show the configuration/options window inside Microsoft Visual Studio 2005:

As
you can see, the add-in will ask you the path for the XML configuration
file. It is based on this file that the semantics for the code are
built. Also, you can see that it requires a plugin assembly; this
assembly contains one (or more) classes that implement a
IIfStatementGenerator interface, and each of these classes are considered language extension plugins.
The
add-in is working, but still needs some work and documentation
supporting it. Nevertheless, here are the binaries if you want to check
it while I don't post a stable release:
ParameterValidation20060327.rar (26.32 KB)