Explore Type Dependency Diagram

Explore Type Dependency Diagram

ReSharper allows you to visually study how types depend on each other in your solution. In the type dependency diagram, you can add any number of types from different projects or compiled assemblies and visualize different kinds of dependencies between them.

Adjust the view of the diagram

Type dependency diagram can be laid out in two ways:

  • Inheritance Hierarchy Layouter— this option arranges types according to their inheritance relations: the base types are moved upward.

  • Business Logic Layouter— this option arranges types according to all displayed relations between them.

You can switch between these options using the corresponding selector in the left:         

Study dependencies between types

On the type dependency diagram, you can visualize several kinds of dependencies. To show or hide specific kinds of dependencies, use the corresponding items in the Filter Dependencies ThemedIcon Filter Screen Gray png selector:

    • Aggregation Dependencies— displays a kind of dependency when a type is a collection or container of other types,
      This kind of dependency is shown as a green dotted line. Name of the corresponding field is shown next to the line. You can hover the mouse over this line to see the field declaration and navigate to the corresponding place in the editor.

    • Usages Dependencies— displays a kind of dependency when variables, parameters or method returns of one type are used in another type.
      This kind of dependency is shown as a blue line whose thickness reflects a relative number of usages. You can hover the mouse over this line to see the list of usages:                  

Clicking on specific usages will bring you to the corresponding place in the text editor, clicking on the Show all usages link opens all usages in the Find Results window.             

    •   Inheritance Dependencies— displays a kind of dependency when one type extends or implements another type. This kind of dependency is shown as a grey line. You can hover the mouse over this line to see the inheritance relation and navigate to the corresponding place in the editor. Transitive inheritance dependencies are shown using dashed lines. You can hover the mouse over such lines and use the popup to check the types though which the dependency goes and add these types to the diagram by clicking on them.                 
原文地址:https://www.cnblogs.com/chucklu/p/14084966.html