Click here to Skip to main content
15,881,455 members
Articles / Desktop Programming / MFC
Article

Assembly Explorer 1.0

Rate me:
Please Sign up or sign in to vote.
4.46/5 (22 votes)
21 Jan 20032 min read 110.3K   3K   39   10
Simple utility to browse assembly object hierarchy

Sample Image - maximum width is 600 pixels

Introduction

In our project we developed a bunch of utility classes. For each one of them we had to create some kind of test application just to enter parameters and display result of method invoked. At some point I decided that WinForm we just created should be the last one. Why could not we create entry form on the fly for each method in utility class, we want to test? With this thought in mind, I dig out mine old little utility that uses reflection to display assembly hierarchy, and make couple of additions.

What we have now is a simple application that can display object hierarchy of any assembly, including properties and attributes of each member. I think, it’s doing it in more user-friendly way than ildasm.exe does. You can display detailed view (as TreeView) or simplified flat view. In addition it can run static methods with parameters of basic data types.

Using the code

Just use File>Open and browse the tree.

Points of Interest

You are welcome to use this code as an example of working with reflection, including dynamic object loading and method invocation.

Some ideas how we can make this utility more useful:

  • Having assembly object tree, we can use CodeDom to generate code for “black box” assembly. May be for new implementation, or to create proxy that intercepts method calls and doing some preprocessing magic.
  • We can create UML model for given assembly. Rational using XML as format for their XDE model files so it should not be too difficult.

I’ll be glad to receive any comments or suggestions.

History

Version 1.0.2 - Recently opened assemblies added to File menu. Compiled exe added to zip. (Thanks to S.Rod. for suggestions)

Version 1.0.3 - Bug fixing in recent files on exit.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Israel Israel
Leon works as Chief Architect at SRL Group. He leads architectural design and development of various enterprise level projects.
You can meet him on user groups, conferences and forums dedicated to Architecture, ASP.NET, Team System etc. or join him for the next white water rafting adventure

Comments and Discussions

 
Questionembeded resources? Pin
Huisheng Chen14-Aug-05 5:15
Huisheng Chen14-Aug-05 5:15 
AnswerRe: embeded resources? Pin
[Marc]24-Nov-05 8:45
[Marc]24-Nov-05 8:45 
GeneralDownload has missing classes Pin
Dr Reedo1-Mar-05 4:32
Dr Reedo1-Mar-05 4:32 
GeneralProxy creation Pin
fernara24-Jun-03 12:56
fernara24-Jun-03 12:56 
GeneralRe: Proxy creation Pin
Leon Langleyben25-Jun-03 3:18
Leon Langleyben25-Jun-03 3:18 
GeneralRe: Proxy creation Pin
fernara25-Jun-03 8:43
fernara25-Jun-03 8:43 
QuestionHow can developers protect there assembly? Pin
Gunmen22-Jan-03 10:49
Gunmen22-Jan-03 10:49 
AnswerRe: How can developers protect there assembly? Pin
Kannan Kalyanaraman23-Jan-03 1:48
Kannan Kalyanaraman23-Jan-03 1:48 
GeneralRe: How can developers protect there assembly? Pin
Anonymous5-May-03 15:08
Anonymous5-May-03 15:08 
GeneralGood start... Pin
Paul Selormey4-Jan-03 16:55
Paul Selormey4-Jan-03 16:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.