A metric that counts the number of statements in a declaration.
Namespace: Metalama.Extensions.Metrics
Assembly: Metalama.Extensions.Metrics.dll
Syntax
public struct StatementsCount : IMetric<IMemberOrNamedType>, IMetric<INamespace>, IMetric<ICompilation>, IMetricRemarks
Counting statements is more relevant than counting lines of code. However, modern C# is more expression-oriented than earlier versions of the language. Counting expression nodes with SyntaxNodesCount has become a more relevant metric.
Use this metric with IDeclaration.Metrics<TExtensible>(TExtensible).Get<TExtension>().
Properties
| Name | Description |
|---|---|
| Value | Gets the total number of statements. |
Methods
| Name | Description |
|---|---|
| ToString() |