示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 public double AverageDataBin(char legacyLaneGroup, DataBinType binType)
 {
     return(AverageDataBin(legacyLaneGroup, LaneStatus.OK, binType));
 }
示例#4
0
 public double TotalDataBin(char legacyLaneGroup, DataBinType binType)
 {
     return(TotalDataBin(legacyLaneGroup, LaneStatus.OK, binType));
 }