I wanted to verify few design patterns in C# code by static analysis. I want to verify these using NDepend. The application is built with MVVM design style, so typical design patterns that I would like to verify are: 1. View-Model classes do not have any DependencyProperties (WPF elements), they should only be seen in View layer. 2. The View layer should not implement IDisposable etc
I have tried building queries in CQL to capture these details, but failed as I need to verify which level a class belongs to and also the properties of it. I understand nested query is not supported by CQL yet, so is there any way I can capture these details by NDepend? I am hoping I can somehow capture the results of multiple queries and perform intersection of them?
Thanks in advance, Shaun