示例#1
0
        public static IncidentStatisticsResultDto fromIncidentStatistics(IncidentStatistics statistics)
        {
            IncidentStatisticsResultDto dto = new IncidentStatisticsResultDto();

            dto.IncidentType  = statistics.IncidentType;
            dto.IncidentCount = statistics.IncidentCount;
            return(dto);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }