コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 private void updateCalculationMethodCache(OSPSuite.Core.Domain.CalculationMethodCache modelCalculationMethodCache, CalculationMethodCache snapshotCalculationMethodCache)
 {
     _calculationMethodCacheMapper.UpdateCalculationMethodCache(modelCalculationMethodCache, snapshotCalculationMethodCache, oneCalculationMethodPerCategory: false);
 }