private void reportSpecies(CompoundProcess compoundProcess, MarkdownTracker tracker) { if (compoundProcess is ISpeciesDependentCompoundProcess processWithSpecies) { tracker.AddValue(PKSimConstants.UI.Species, processWithSpecies.Species.DisplayName); } }
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(Formulation formulation, MarkdownTracker tracker, int indentationLevel) { base.Report(formulation, tracker, indentationLevel); var formulationInfo = _representationInfoRepository.InfoFor(RepresentationObjectType.CONTAINER, formulation.FormulationType); tracker.AddValue(PKSimConstants.UI.Type, formulationInfo.DisplayName); ReportParametersIn(formulation, tracker, indentationLevel); }
public override void Report(PKSimEvent pkSimEvent, MarkdownTracker tracker, int indentationLevel) { base.Report(pkSimEvent, tracker, indentationLevel); var eventTemplate = _eventGroupRepository.FindByName(pkSimEvent.TemplateName); tracker.AddValue(PKSimConstants.UI.Type, _representationInfoRepository.DisplayNameFor(eventTemplate)); ReportParametersIn(pkSimEvent, tracker, indentationLevel); }
private void report(PartialProcess partialProcess, MarkdownTracker tracker) { tracker.AddValue(PKSimConstants.UI.Molecule, partialProcess.MoleculeName); switch (partialProcess) { case EnzymaticProcess enzymaticProcess when !string.IsNullOrEmpty(enzymaticProcess.MetaboliteName): tracker.AddValue(PKSimConstants.UI.Metabolite, enzymaticProcess.MetaboliteName); break; } }
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 string ExportToMarkdownString(object objectToExport) { var builder = _markdownBuilderRepository.BuilderFor(objectToExport); if (builder == null) { return(_reportGenerator.StringReportFor(objectToExport)); } var tracker = new MarkdownTracker(); builder.Report(objectToExport, tracker); return(tracker.ToString()); }
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 abstract void Report(T objectToReport, MarkdownTracker tracker, int indentationLevel);
public void Report(object objectToReport, MarkdownTracker tracker, int indentationLevel = 1) { Report(objectToReport.DowncastTo <T>(), tracker, indentationLevel); }
protected virtual void ReportParametersIn(T buildingBlock, MarkdownTracker tracker, int buildingBlockIndentationLevel) { _markdownBuilderRepository.Report(buildingBlock.AllUserDefinedParameters(), tracker, buildingBlockIndentationLevel + 1); }
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); }