In this case it is clearly visible that the class is dependent on, using a data type called NoiseLevelEx within a sub-namespace of CoreBot.Bots. I only realized this feature exists later, and it seems very helpful to pin-point the actual issue: Hovering over the arrow shows a help in a tooltip explaining the issue.īy double clicking the red arrow we may dive into a coupling graph, that helps to understand which A uses B, and B uses A.
#NDEPEND SERIAL KEY CODE#
The nice thing about NDepend is that I had no additional effort to manually move code elements around to look good, the default renderer seems to render items in a left-to-right fashion making the graph easier to understand.Īnother thing that shows straight up: mutually dependent namespaces are marked with light red arrows. Note, that these data types are only used within the IotProcessor namespace, they are not shared between the chatbot and the function projects. Bedsides this, I have a startup class to register some dependencies to IoC container and extensions to enable work with data types in a more convenient way. Functions, services and data types are all separated. The above result shows a clear layered architecture. Refactoring took me a couple of iterations: moving classes, updating namespaces, moving files to different folders, then carefully observing changes on the Dependency Graph view. After the cleanup, the whole assembly takes a different shape: Typically functions depend on data types and service types, while service types on data types. By hovering over the types, I see my attempt to have a clear layered structure. Here, I see a mixture of data types, functions, extensions and service types in one namespace. The icon in the top left corner of each node can help to understand if we are looking at an assembly, a namespace or a type. Zooming into to the IotProcessor namespace I see there are a mixture of types: Keep in mind, that the code is still 'designed' to be layered, but because of multiple rounds of evolution, namespaces are mixed up. Let's dive into some of the details, to find things to fix.
![ndepend serial key ndepend serial key](https://damienbod.files.wordpress.com/2017/03/nlogpostgresql_01.png)
My only concern is having the selected element colored to dark red, makes me think that I have many issues with it. I really like direct/indirect calls highlighted differently, that it nice touch. As it can been on the above image, there are multiple arrows, colored differently while hover over of code elements.įortunately, there is a help sidebar with details. It also worth spending time on understanding color coding of the arrows. NDepend does its best to group things together in a sensible way, so one can reason about. The initial image looks orderly, but do not take it as a good sign. In this case I choose Dependency Graph for further investigation. Dependency Graph First ViewĪfter building my projects and importing the solution to NDepend, we can choose whether we want to investigate the App Metrics / Quality Gates or one of the Diagrams.
#NDEPEND SERIAL KEY INSTALL#
Once I notice that I use an app extensively for a period of time, I can install the VS Extension. I like these apps, because I can just drop them to my \tools folder and use them as needed. NDepend has a VS Extension, which streamlines work a lot, but at the same time it also has standalone executable, which does not require installation. An ASP.NET Core project of the chatbot implementation, an Azure Functions project for managing IoT devices and a shared library project common types. The Visual Studio solution consists of three projects. This made all namespaces, dependencies and responsibilities mixed.
![ndepend serial key ndepend serial key](https://blogs.msmvps.com/bsonnino/files/2019/11/NDepend2.png)
The project is started as a Proof Of Concept (POC), then I based 3 other Proof Of Concept apps on it. In this post I will use the Dependency Graph view on one of my most 'messy' projects. I am keen to try it out, and I just have the prefect project for the test. NDepend's 2020 release has a new Dependency Graph view. Fixing my classes with NDepend Graph View 6 minutes