public static ActivityStatisticsResultDto fromActivityStatistics(ActivityStatistics statistics) { ActivityStatisticsResultDto dto = new ActivityStatisticsResultDto(); dto.id = statistics.Id; dto.instances = statistics.Instances; dto.failedJobs = statistics.FailedJobs; dto.incidents = new List <IncidentStatisticsResultDto>(); foreach (IncidentStatistics incident in statistics.IncidentStatistics) { IncidentStatisticsResultDto incidentDto = IncidentStatisticsResultDto.fromIncidentStatistics(incident); dto.incidents.Add(incidentDto); } return(dto); }
public static ProcessDefinitionStatisticsResultDto fromProcessDefinitionStatistics(ProcessDefinitionStatistics statistics) { ProcessDefinitionStatisticsResultDto dto = new ProcessDefinitionStatisticsResultDto(); dto.definition = ProcessDefinitionDto.fromProcessDefinition(statistics); dto.id = statistics.Id; dto.instances = statistics.Instances; dto.failedJobs = statistics.FailedJobs; dto.incidents = new List <IncidentStatisticsResultDto>(); foreach (IncidentStatistics incident in statistics.IncidentStatistics) { IncidentStatisticsResultDto incidentDto = IncidentStatisticsResultDto.fromIncidentStatistics(incident); dto.incidents.Add(incidentDto); } return(dto); }