Most used methods (Rank)

Code Query Statistics

Lists the 100 application methods with the highest MethodRank, computed by the Google PageRank algorithm on the methods dependency graph: methods called by many methods themselves having many callers. Metric: https://www.ndepend.com/docs/code-metrics#MethodRank

Any change to a much-called method impacts most callers: painful. So high-MethodRank methods should preferably be abstract methods, less subject to signature changes, and shielding callers 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 methods (Rank)</Name>
(from m in Application.Methods 
 where !m.IsGeneratedByCompiler
 orderby m.Rank descending
 select new { m, m.Rank, m.MethodsCallingMe }).Take(100)

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

Statistics: all 13 items