Sunday, August 26, 2007

Creating a Reflector Addin? Check Out this Cool Walk Through from Jason Haley

JasonHaley.comWays to use .Net Reflector #2.1: Creating your own add-ins

"In this entry I walk through creating a Reflector add-in that exposes its own UI using a user control and works with the Reflector code model on a simple level.  This add-in will expose itself on the context menu of the assembly browser (enabled only in certain conditions) when clicked it will show the user control that uses the Reflector code model of the currently selected type to provide functionality to the user.

...

The final look of the control and context menu item is to be something like this:

BitFlagConverter ContextMenu

...

Summary
In this entry I’ve walked through how to create a Reflector add-in that provides its own UI via a UserControl and how to tie it into the context menu of the assembly browser. I’ve also walked through the more interesting parts of the logic that listens to a user’s selection in the assembly browser and some of how to determine what the current type selected is and its properties. We also looked at the field declarations on a type and touched on expressions with the field’s Initializer property. ..."

Jason has written up a great walk through for creating a Reflector addin. Besides the C# source for this simple but useful plugin he's also provided a nine page DocX version of walk though (making it easier to view it offline, print it, etc).

If you're interesting in creating a Reflector addin, you should check his post out. He put a good deal of work into this write up and it shows...

No comments: