# Types

Trend Metric Trend Metrics / Code Size

Counts all non-compiler-generated application types, showing per type the all technical-debt and issues (of the type and its child members).

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="# Types" Unit="Types" />
from t in Application.Types.Where(t => !t.IsGeneratedByCompiler || 
   // C# Top Level Statement type is generated by compiler but still part of Application types
   t.FullNameEqualsAny("Program", "<Program>$"))
select new {
   t,
   Debt = t.AllDebt(),
   Issues = t.AllIssues(),
   t.NbLinesOfCode
}

//<Desc>
// Counts all non-compiler-generated application types, showing per type the
// **all** technical-debt and issues (of the type and its child members).
//</Desc>

Trend Metrics / Code Size: all 22 items