Class ProtoReportItemExtensions
Traversal and coverage arithmetic shared by every consumer of ProtoReportItem trees - the report summary, the HTML renderer and Run gate coverage - so the three cannot disagree.
public static class ProtoReportItemExtensions
- Inheritance
-
ProtoReportItemExtensions
- Inherited Members
Methods
CoverageTotals(IEnumerable<ProtoReportItem>)
Aggregates the coverage units in items; aggregate rows are excluded from every count.
public static ProtoCoverageTotals CoverageTotals(this IEnumerable<ProtoReportItem> items)
Parameters
itemsIEnumerable<ProtoReportItem>
Returns
CoverageUnits(IEnumerable<ProtoReportItem>)
The coverage items that carry a verdict. An item whose IsCovered is null is an aggregate - a type, a grouping row - not a unit, so it is excluded from coverage accounting everywhere.
public static IEnumerable<ProtoReportItem> CoverageUnits(this IEnumerable<ProtoReportItem> items)
Parameters
itemsIEnumerable<ProtoReportItem>
Returns
Flatten(ProtoReportItem)
Yields the item and all of its descendants, depth first.
public static IEnumerable<ProtoReportItem> Flatten(this ProtoReportItem item)
Parameters
itemProtoReportItem
Returns
Flatten(IEnumerable<ProtoReportItem>)
Yields every item and all of its descendants, depth first.
public static IEnumerable<ProtoReportItem> Flatten(this IEnumerable<ProtoReportItem> items)
Parameters
itemsIEnumerable<ProtoReportItem>
Returns
IsKind(ProtoReportItem, string)
Tests an item's kind. Kinds are open strings and integrations may capitalize them, so the comparison ignores case.
public static bool IsKind(this ProtoReportItem item, string kind)
Parameters
itemProtoReportItemkindstring