Most used types (Rank)

Code Query Statistics

Lists the 100 application types with the highest TypeRank, computed by the Google PageRank algorithm on the types dependency graph: types used by many types themselves having many users. Metric: https://www.ndepend.com/docs/code-metrics#TypeRank

Any change to a much-used type impacts most clients: painful. So high-TypeRank types should preferably be interfaces, less subject to change, and shielding clients from implementation details — in essence the Liskov Substitution Principle: http://en.wikipedia.org/wiki/Liskov_substitution_principle

CQLinq source

This code query is written in CQLinq, C# LINQ over the NDepend code model. It ships with every new NDepend project: you can read it, adapt it, or use it as a starting point for your own custom rules.

// <Name>Most used types (Rank)</Name>
(from t in Application.Types 
 where !t.IsGeneratedByCompiler
 orderby t.Rank descending
 select new { t, t.Rank, t.TypesUsingMe }).Take(100)

//<Desc>
// Lists the 100 application types with the highest **TypeRank**, computed
// by the **Google PageRank** algorithm on the types dependency graph: types
// used by many types themselves having many users. Metric:
// https://www.ndepend.com/docs/code-metrics#TypeRank
//
// Any change to a much-used type **impacts** most clients: painful. So
// high-*TypeRank* types should preferably be **interfaces**, less subject
// to change, and shielding clients from implementation details — *in
// essence* the **Liskov Substitution Principle**:
// http://en.wikipedia.org/wiki/Liskov_substitution_principle
//</Desc>

Statistics: all 13 items