public RootNodeType MapFrom(PartialProcess partialProcess) { var type = partialProcess.GetType(); if (type.IsAnImplementationOf <EnzymaticProcess>()) { return(PKSimRootNodeTypes.CompoundMetabolizingEnzymes); } if (type.IsAnImplementationOf <SpecificBindingPartialProcess>()) { return(PKSimRootNodeTypes.CompoundProteinBindingPartners); } if (type.IsAnImplementationOf <InhibitionProcess>()) { return(PKSimRootNodeTypes.InhibitionProcess); } if (type.IsAnImplementationOf <InductionProcess>()) { return(PKSimRootNodeTypes.InductionProcess); } if (type.IsAnImplementationOf <TransportPartialProcess>()) { return(PKSimRootNodeTypes.CompoundTransportProteins); } throw new ArgumentException(partialProcess.ToString()); }
public CannotSelectThePartialProcessMoreThanOnceException(PartialProcess partialProcess) : base(PKSimConstants.Error.CannotSelectTheSamePartialProcessMoreThanOnce(partialProcess.ToString())) { }