views:

42

answers:

2

Hi guys,

Do you know of a tool that generates wrapper class based on another class?

EDIT: By wrapper class I mean a class which wraps all exposed(public, protected) properties methods events so that you can put any logic in the middle. My concrete purpose is use it to verify the behavior of the wrapped class.

A: 

I have used SmartCode it's flexible and customizable http://www.codeproject.com/KB/dotnet/SmartCode-Code_Generation.aspx

dankyy1
+2  A: 

You could use T4 templating and write your own logic...

http://msdn.microsoft.com/en-us/library/bb126445.aspx http://www.hanselman.com/blog/T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudioSecret.aspx

Yves M.