public double TotalDataBin(char legacyLaneGroup, LaneStatus status, DataBinType binType) { double total = 0; GetLanesByLegacyLaneGroup(legacyLaneGroup, status).ForEach(lane => { foreach (DataBin db in lane.DataBins.Values.Where(db => db.BinType.Equals(binType))) { total += db.BinValue; } ; }); return(total); }
public double AverageDataBin(char legacyLaneGroup, LaneStatus status, DataBinType binType) { double total = 0; double count = 0; GetLanesByLegacyLaneGroup(legacyLaneGroup, status).ForEach(lane => { foreach (DataBin db in lane.DataBins.Values.Where(db => db.BinType.Equals(binType))) { total += db.BinValue; } ; ++count; }); if (total == 0 || count == 0) { return(total); } return(total / count); }
public double AverageDataBin(char legacyLaneGroup, DataBinType binType) { return(AverageDataBin(legacyLaneGroup, LaneStatus.OK, binType)); }
public double TotalDataBin(char legacyLaneGroup, DataBinType binType) { return(TotalDataBin(legacyLaneGroup, LaneStatus.OK, binType)); }