Пример #1
0
        public override IReadOnlyCollection <object> Report(IReadOnlyCollection <ISimulationComparison> simulationComparisons, OSPSuiteTracker buildTracker)
        {
            var list = new List <object>();

            if (!simulationComparisons.Any())
            {
                return(list);
            }

            list.Add(new Part(PKSimConstants.UI.SimulationComparison.Pluralize()));
            simulationComparisons.Each(comparison =>
            {
                var reporter = _reporterRepository.ReportFor(comparison);
                list.AddRange(reporter.Report(comparison, buildTracker));
            });

            return(list);
        }
Пример #2
0
        public async Task CreateReportAsync(object objectToReport, ReportConfiguration reportConfiguration)
        {
            if (objectToReport == null)
            {
                return;
            }

            var reporter = _reporterRepository.ReportFor(objectToReport);

            if (reporter == null)
            {
                throw new OSPSuiteException(Error.CouldNotFindAReporterFor(objectToReport.GetType()));
            }

            var tracker = _buildTrackerFactory.CreateFor <OSPSuiteTracker>(reportConfiguration.ReportFile);

            tracker.Settings = buildSettingsFrom(reportConfiguration);

            await _reportCreator.ReportToPDF(tracker, reportSettingsFrom(reportConfiguration), reporter.Report(objectToReport, tracker));
        }