0

I am in the process of generating a dependency graph of all class dependencies that is used to generate a d3 force directed graph. Generating the initial graph is fine but does result in a lot more data than I actually need to display.

My current code gets all types from an assembly, including abstract classes, and iterates over each type and builds it's dependencies. What I now need to do is to exclude any Abstract classes BUT keep the dependency link, if that makes sense, but I am struggling to get a clear idea of how to do it.

Basically I think I need to do something like the following sudo code

for each abstract child
  copy the edges of the children
  if I am the abstracts last parent
     then remove the abstract
  delete the edge to the abstract child

Does this make sense? I am not sure if I thinking in the right way so any pointers/guidance/examples of anything similar would be greatly appreciated.

Reggie
  • 133
  • 2
  • 10
  • Does this answer your question? [Get all inherited classes of an abstract class](https://stackoverflow.com/questions/5411694/get-all-inherited-classes-of-an-abstract-class) – Sinatr Dec 08 '20 at 16:20
  • Thanks, it is close but not quite, however it has made me rethink what I am trying to do and I think my approach is wrong. I think I should be looking at finding all concrete implementations of the abstract and using those instead of the abstract. – Reggie Dec 09 '20 at 09:08

0 Answers0