public override void Report(Compound compound, MarkdownTracker tracker, int indentationLevel) { base.Report(compound, tracker, indentationLevel); var subLevelIndentation = indentationLevel + 1; tracker.Add(PKSimConstants.ObjectTypes.Parameter.Pluralize().ToMarkdownLevelElement(subLevelIndentation)); var allAlternatives = compound.AllParameterAlternativeGroups().SelectMany(x => x.AllAlternatives); var allCompoundParameters = new List <CompoundParameter>(); foreach (var alternative in allAlternatives) { var allUserDefinedParameters = alternative.AllUserDefinedParameters().ToList(); allUserDefinedParameters.Each(p => allCompoundParameters.Add(mapFrom(alternative, p))); } var allSimpleParameters = compound.AllSimpleParameters().Where(p => !p.IsDefault).ToList(); allSimpleParameters.Each(p => allCompoundParameters.Add(mapFrom(p))); tracker.Add(allCompoundParameters.ToMarkdownTable()); tracker.Add(PKSimConstants.UI.CalculationMethods.ToMarkdownLevelElement(subLevelIndentation)); _markdownBuilderRepository.Report(compound.CalculationMethodCache, tracker); tracker.Add(PKSimConstants.UI.Processes.ToMarkdownLevelElement(subLevelIndentation)); compound.AllProcesses().Each(x => _markdownBuilderRepository.Report(x, tracker, subLevelIndentation + 1)); }
public override void Report(IEnumerable <IParameter> parameters, MarkdownTracker tracker, int indentationLevel) { var parameterElements = parameters.Select(x => _parameterElementMapper.MapFrom(x)).ToList(); if (!parameterElements.Any()) { return; } tracker.Add(PKSimConstants.ObjectTypes.Parameter.Pluralize().ToMarkdownLevelElement(indentationLevel)); tracker.Add(parameterElements.ToMarkdownTable()); }
public override void Report(CompoundProcess compoundProcess, MarkdownTracker tracker, int indentationLevel) { tracker.Add($"{_markdownBuilderRepository.TypeFor(compoundProcess)}: {compoundProcess.Name}".ToMarkdownLevelElement(indentationLevel)); reportSpecies(compoundProcess, tracker); switch (compoundProcess) { case PartialProcess partialProcess: report(partialProcess, tracker); break; } _markdownBuilderRepository.Report(compoundProcess.AllUserDefinedParameters(), tracker, indentationLevel + 1); }
public override void Report(CalculationMethodCache calculationMethodCache, MarkdownTracker tracker, int indentationLevel = 0) { var calculationMethods = calculationMethodCache .Select(x => new { CalculationMethod = x, Category = _calculationMethodCategoryRepository.FindBy(x.Category) }) .Where(x => x.Category.AllItems().Count() > 1) .Select(x => new { Name = _representationInfoRepository.DisplayNameFor(x.Category), Value = _representationInfoRepository.DisplayNameFor(x.CalculationMethod), } ); tracker.Add(calculationMethods.ToMarkdownTable()); }
public override void Report(T buildingBlock, MarkdownTracker tracker, int indentationLevel) { tracker.Add($"{_markdownBuilderRepository.TypeFor(buildingBlock)}: {buildingBlock.Name}".ToMarkdownLevelElement(indentationLevel)); }
public override void Report(T buildingBlock, MarkdownTracker tracker, int indentationLevel) { base.Report(buildingBlock, tracker, indentationLevel); tracker.Add(_reportGenerator.StringReportFor(buildingBlock)); ReportParametersIn(buildingBlock, tracker, indentationLevel); }