Is it possible to compose requests in CQL ?
I would like to write something like:
SELECT TYPES FROM ASSEMBLIES "myassemblie" WHERE IsUsing SELECT METHODS FROM ASSEMBLIES "myotherassemblie" WHERE IsStatic
Thanks, Vans
Is it possible to compose requests in CQL ?
I would like to write something like:
SELECT TYPES FROM ASSEMBLIES "myassemblie" WHERE IsUsing SELECT METHODS FROM ASSEMBLIES "myotherassemblie" WHERE IsStatic
Thanks, Vans
The NDepend team is proud to finally provides an elegant answer to this question :) Thanks to the new NDepend v4 Code Query LINQ (CQLinq) feature, what you are asking for can be written for example like:
let staticMethods = Application.Assemblies.WithName("nunit.core")
.ChildMethods().Where(m => m.IsStatic)
from t in Application.Assemblies.WithName("nunit.util")
.ChildTypes().UsingAny(staticMethods )
let staticMethodsUsed = staticMethods.UsedBy(t)
select new { t, staticMethodsUsed }
There are many other ways to write such query, but this way is certainly the most concise and optimized one (the top-right panel tells it is executed in 4ms):
Been reading through a lot of Q s and posts and see that subqueries/nested queries/query composition will not be supported until the next version. However I m not sure if that is what I need, in my ...
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 ...
Is it possible to compose requests in CQL ? I would like to write something like: SELECT TYPES FROM ASSEMBLIES "myassemblie" WHERE IsUsing SELECT METHODS FROM ASSEMBLIES "myotherassemblie" WHERE ...
CQL makes it easy to find methods where CodeWasChanged but I also need to compare the metrics - I want to find modified code and see if it has improved or not. I m evaluating ndepend and cppdepend ...
A familiar problem using VisualStudio is the mysterious calling of property getters. If these have side effects (the most common being of the form if (foo == null) foo = new foo(); return foo; ), then ...
In order to determine what low-level framework types a web application is directly using, one has to define each and every assembly involved. SELECT TYPES FROM ASSEMBLIES "Company.System.Framework", "...
I m trying to get NDepend to identify long methods using a modified version of the standard "Methods too big" query. I don t want to report long methods that the developers have little control over, ...
I m working on a brown-field project that was initially developed for .NET 1.1, and subsequently was retro-fitted to .NET 2.0, with a smattering of .NET 3.5 I m curious what kind of metrics to use to ...