# Methods

Trend Metric Trend Metrics / Code Size

Counts all non-compiler-generated application methods, showing per method the technical-debt and issues.

CQLinq source

This trend metric 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.

// <TrendMetric Name="# Methods" Unit="Methods" />
from m in Application.Methods.Where(m => !m.IsGeneratedByCompiler || 
   // C# Top Level Statement method is generated by compiler but still part of Application types
   m.Name.StartsWith("<Main>$"))
select new {
   m,
   Debt = m.Debt(),
   Issues = m.Issues(),
   m.NbLinesOfCode
}

//<Desc>
// Counts all non-compiler-generated application methods, showing per method
// the technical-debt and issues.
//</Desc>

Trend Metrics / Code Size: all 22 items