Exemplo n.º 1
0
        private List <ProjectMetricModel> GetProjectMetrics(ICollection <ProjectMetric> metrics, bool metricProps = false, bool dashboard = false) => metrics.Select(m =>
        {
            ProjectMetricModel projectMetric = _projectMetricService.ConvertToModel(m);

            if (metricProps)
            {
                projectMetric.Metric = _metricService.ConvertToModel(m.Metric);
                if (dashboard)
                {
                    projectMetric.Metric.Columns    = _metricService.GetMetricColumns(m.Metric.MetricColumn);
                    projectMetric.Metric.MetricType = _metricTypeService.ConvertToModel(m.Metric.MetricType);
                }
            }

            return(projectMetric);
        }).ToList();
Exemplo n.º 2
0
 private MetricTypeModel GetMetricType(MetricType metricType) => _metricTypeService.ConvertToModel(metricType);