private void updateCalculationMethodsFromSnapshot(SnapshotOriginData snapshot, ModelOriginData originData) { var defaultCalculationMethodsForSpecs = _originDataTask.AllCalculationMethodCategoryFor(originData.Species) .Select(x => x.DefaultItemForSpecies(originData.Species)); defaultCalculationMethodsForSpecs.Each(originData.AddCalculationMethod); _calculationMethodCacheMapper.UpdateCalculationMethodCache(originData, snapshot.CalculationMethods); }
public override async Task <ModelCompound> MapToModel(SnapshotCompound snapshot) { var compound = _compoundFactory.Create(); MapSnapshotPropertiesToModel(snapshot, compound); _calculationMethodCacheMapper.UpdateCalculationMethodCache(compound, snapshot.CalculationMethods); await updateAlternatives(compound, snapshot.Lipophilicity, COMPOUND_LIPOPHILICITY); await updateAlternatives(compound, snapshot.FractionUnbound, COMPOUND_FRACTION_UNBOUND); await updateAlternatives(compound, snapshot.Solubility, COMPOUND_SOLUBILITY); await updateAlternatives(compound, snapshot.IntestinalPermeability, COMPOUND_INTESTINAL_PERMEABILITY); await updateAlternatives(compound, snapshot.Permeability, COMPOUND_PERMEABILITY); updatePkaTypes(compound, snapshot); await updateProcesses(snapshot, compound); await UpdateParametersFromSnapshot(snapshot, compound); return(compound); }
private void updateCalculationMethodCache(OSPSuite.Core.Domain.CalculationMethodCache modelCalculationMethodCache, CalculationMethodCache snapshotCalculationMethodCache) { _calculationMethodCacheMapper.UpdateCalculationMethodCache(modelCalculationMethodCache, snapshotCalculationMethodCache, oneCalculationMethodPerCategory: false); }