Ndepend Class Coupling Value exclude all classes not in my project

To do so you need to edit the code query generated by the Search type by class coupling panel. Edit Query of NDepend Search type by class coupling panel

The query generated to edit manually is:

from t in Application.Types 
where t.NbTypesUsed >= 0 
orderby t.NbTypesUsed descending 
select new { 
   t,
   t.TypesUsed,
   t.TypesUsingMe
}

You just need to edit the TypesUsed line:

from t in Application.Types 
where t.NbTypesUsed >= 0 
orderby t.NbTypesUsed descending 
select new { 
   t,
   TypesUsed = t.TypesUsed.Where(tu => !tu.IsThirdParty),
   t.TypesUsingMe
}

Et voilà 🙂

NDepend Search type by class coupling discard third-party types

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top