Search The Blog
About this site

@RoyOsherove

Subscribe!

This site aims to connect all the dots of my online activities - from tools, books blogs and twitter accounts, to upcoming conferences, engagements and user group talks.

from 5whys.com
Twitter: @RoyOsherove
My Book: The Art of Unit Testing
Latest Posts
« Is this how Israelis are perceived? | Main | Data Layer Testing: Test Inheritance Patterns »
Thursday
Nov292007

IL Debug Visualizer for Compiled Lambda Expressions, MethodBase and DynamicMethod

Mark Watts just emailed me with cool news. He took the Dynamic Method visualizers I worked on and created a version of them that will also work and show the IL on Lambda Expressions. here's the full list of changes he did to the source code:

1) Solution and projects all coverted over to VS2008

2) References to Microsoft.VisualStudio.DebuggerVisualizers updated to version 9

3) M3 and M4 methods added in the test project to demonstrate how to use the new functionality

4) MethodBodyVisualizer added DebuggerVisualizer attribute to target Delegates - not 100% certain this is safe but there is a lot of spelunking around where the brave fear to tread in this project. :)

5) ILReader project

    * Updated ILReaderFactory.GetReader to attempt to recognize when the target is a lamda expression and retrieve the correct MethodBase for it.

    * Updated DynamicScopeTokenResolver to handle GenericFieldInfo - Compiled Expressions store strings and the like in a global generic field array that is part of the delegate and is of type GenericFieldInfo.

 

* Download available here -

 

Install:

- take the dlls from the bin directory

- put them under my documents\visual studio\visualizers.

- if the directory does not exist, create it.

PrintView Printer Friendly Version

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>