A metric that counts lines of code in a declaration using multiple counting methods.
Namespace: Metalama.Extensions.Metrics
Assembly: Metalama.Extensions.Metrics.dll
Syntax
public struct LinesOfCode : IMetric<IMemberOrNamedType>, IMetric<INamespace>, IMetric<ICompilation>, IMetricRemarks
This metric provides three line count measurements:
- Logical: Lines containing code tokens, excluding braces, comments, and blank lines.
- NonBlank: Lines containing any tokens (including braces), excluding blank lines and comments.
- Total: Total line span from start to end of the declaration.
Use this metric with IDeclaration.Metrics<TExtensible>(TExtensible).Get<TExtension>().
Properties
| Name | Description |
|---|---|
| Logical | Gets the number of logical lines of code, excluding braces, comments, and blank lines. |
| NonBlank | Gets the number of non-blank lines (lines containing any tokens, including braces). |
| Total | Gets the total line span of the declaration (end line - start line + 1). |
Methods
| Name | Description |
|---|---|
| ToString() |