# Source Files

Trend Metric Trend Metrics / Code Size

Counts source files. A value of 0 means PDB files were unavailable at analysis time: https://www.ndepend.com/docs/ndepend-analysis-inputs-explanation

Source files can't be matched by a query, but editing "Application Types" with Group by source file declarations lists them with types declarations.

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="# Source Files" Unit="Source Files" />
Application.Assemblies.SelectMany(
  a => a.SourceDecls.Select(sd => sd.SourceFile.FilePathString))
.Distinct(StringComparer.OrdinalIgnoreCase)
.Count()

//<Desc>
// Counts source files. A value of 0 means PDB files were unavailable at
// analysis time:
// https://www.ndepend.com/docs/ndepend-analysis-inputs-explanation
//
// Source files can't be matched by a query, but editing "Application Types"
// with *Group by source file declarations* lists them with types
// declarations.
//</Desc>

Trend Metrics / Code Size: all 22 items