Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any tool to generate class dependency graph from a solution [closed]

Tags:

c#

.net

Have a solution, is there any tool to generate class map and their relationship?

like image 775
user496949 Avatar asked Feb 24 '11 07:02

user496949


People also ask

What is dependency graph in CD?

A dependency graph is used to represent the flow of information among the attributes in a parse tree. In a parse tree, a dependency graph basically helps to determine the evaluation order for the attributes.

What is a data dependency graph?

A dependency graph is a data structure formed by a directed graph that describes the dependency of an entity in the system on the other entities of the same system. The underlying structure of a dependency graph is a directed graph where each node points to the node on which it depends.


2 Answers

If you are using Visual Studio 2010, you can generate a Dependency Graph.

In the menu, go to:

Architecture > Generate Dependecy Graph > By Class

Here's an example of what it shows (in a very small project):

Dependecy Graph

And you can even see the dependecies between two classes. Take a look at the following image:

Calls

If you expand the class Logger and click on Scraper, you will see what methods are being called (in Logger) by Scraper.

In this moment I don't have an example of inheritance, but you can always create a project and test it yourself.

like image 144
Oscar Mederos Avatar answered Sep 22 '22 16:09

Oscar Mederos


The dependency graph feature of VS2010 is pretty cool, but it requires VS2010 Ultimate. If you don't have it, I can highly recommand NDepend.

It will give you dependency graphs, and much, MUCH more. There's even an open source / academic license available (with some of the feaures cut out).

like image 25
Willem van Rumpt Avatar answered Sep 22 '22 16:09

Willem van Rumpt