public static IncidentStatisticsResultDto fromIncidentStatistics(IncidentStatistics statistics) { IncidentStatisticsResultDto dto = new IncidentStatisticsResultDto(); dto.IncidentType = statistics.IncidentType; dto.IncidentCount = statistics.IncidentCount; return(dto); }
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); }