public static StationRow Create(StationOffsetReportDataRow station, CompactionReportStationOffsetRequest request) { var offsetCount = station.Offsets.Count; var row = new StationRow { Station = station.Station, Offsets = new StationOffsetRow[offsetCount], Maximum = OffsetStatistics.Create(OffsetStatisticType.Maximum, station, request), Minimum = OffsetStatistics.Create(OffsetStatisticType.Minimum, station, request), Average = OffsetStatistics.Create(OffsetStatisticType.Average, station, request) }; return(row); }
/// <summary> /// Creates an instance of the GridReport class. /// </summary> /// <param name="startTime">The report's 'start' time.</param> /// <param name="endTime">The report's 'end' time.</param> /// <param name="rows">Grid rows.</param> /// <param name="request"></param> /// <returns>An instance of the GridReport class.</returns> public StationOffsetReport(DateTime startTime, DateTime endTime, StationRow[] rows, CompactionReportStationOffsetRequest request) { Rows = rows; TemperatureReport = request.ReportTemperature; CmvReport = request.ReportCMV; CutFillReport = request.ReportCutFill; ElevationReport = request.ReportElevation; MdpReport = request.ReportMDP; PassCountReport = request.ReportPassCount; StartTime = startTime.Kind == DateTimeKind.Utc ? startTime : startTime.ToUniversalTime(); EndTime = endTime.Kind == DateTimeKind.Utc ? endTime : endTime.ToUniversalTime(); }