Example #1
0
        public static DurationReportResultDto fromDurationReportResult(DurationReportResult durationReport)
        {
            DurationReportResultDto dto = new DurationReportResultDto();

            dto.minimum = durationReport.Minimum;
            dto.maximum = durationReport.Maximum;
            dto.average = durationReport.Average;

            return(dto);
        }
Example #2
0
        public static ReportResultDto fromReportResult(ReportResult reportResult)
        {
            ReportResultDto dto = null;

            if (reportResult is DurationReportResult)
            {
                DurationReportResult durationReport = (DurationReportResult)reportResult;
                dto = DurationReportResultDto.fromDurationReportResult(durationReport);
            }

            dto.period     = reportResult.Period;
            dto.periodUnit = reportResult.PeriodUnit.ToString();

            return(dto);
        }