Type Visualiser (aka Dependency Visualiser) is a .NET application to visualise a compiled .NET type from an assembly. It shows dependencies to other types and the strength of those dependencies. It also shows statistics on each individual class (ie number of methods, properties and Intermediate Language (MSIL) Lines of Code (LOC).
Why?
I wrote it for two reasons.
- I found myself spending time drawing sketches of code that is new to me to. Understanding how a type is linked to other types and visualising that helps me get a better understanding of the whole solution.
- Working with legacy code is challenging and the architecture is seldom as clean and organised as what it was originally intended to be. Trying to write automated tests across legacy code is hard and can be time consuming. Visually understanding how many dependencies a type has and how tight or strong those dependencies are helps me strategize and estimate writing tests for legacy code.
One of the reasons why I spent time on "trying" to make it look pretty (and keep in mind I'm a developer not a designer ;-)) is to use these diagrams to show legacy-code project stakeholders the need for some code clean-up or training.
Screenshots
![]() |
| A sample class included in the project |
![]() |
| Microsoft Unity Container |
![]() |
| Unity after a manual tidy up and hiding types I am not concerned with. |
Features
- Load any .NET Assembly browse the types (public and internal) and visualise any of its types.
- Dependencies are shown as lines, the thicker the line the more dependent the subject is on the other type.
- Colour coded lines. See direct usage of types as opposed to access via an interface. (Red is direct access, black is access via an interface).
- See the difference between fields and local method variable consumption with dotted and solid lines.
- Hide System (.NET Framework) types, Trivial Types (you define the trivial list using regular expressions), or just right click and hide any type.
- Rearrange the diagram how you like it, and save it for later retrieval.
- Recently viewed type files and reload from this list.
- Save as a bitmap by that wonderful Screenshot feature of Windows (ALT+PrintScreen).
Download
You are free to use it, distribute it, but may not disassemble or modify it in any way and you may not remove references to the author.
Feel free to report issues here. Although I'll try to address any issues enhancements, I do have a day job ;-) There will be issues with it, this is not a commercial product, just a simple after hours project.
Known issues:
Previous Versions:
1.0.8 32bit | 64bit 14/Jan/2012 Version 1.0.8
Known issues:
- After loading a type you might notice some some of the lines not connecting up properly to the subject type in the middle. A work around for now is to drag the subject type slightly and the arrows will refresh.
- 1.0.8 -> 1.0.9
Bug fix release.
Previous Versions:
1.0.8 32bit | 64bit 14/Jan/2012 Version 1.0.8



0 comments:
Post a Comment