private IModel modelFrom(IModel sourceModel, bool shouldCloneModel)
        {
            if (!shouldCloneModel)
            {
                return(sourceModel);
            }

            return(_cloneManagerForModel.CloneModel(sourceModel));
        }
        public IMoBiSimulation CloneSimulation(IMoBiSimulation simulationToClone)
        {
            var buildConfig = new MoBiBuildConfiguration
            {
                MoleculesInfo            = CloneBuidingBlockInfo(simulationToClone.MoBiBuildConfiguration.MoleculesInfo),
                ReactionsInfo            = CloneBuidingBlockInfo(simulationToClone.MoBiBuildConfiguration.ReactionsInfo),
                SpatialStructureInfo     = CloneBuidingBlockInfo(simulationToClone.MoBiBuildConfiguration.SpatialStructureInfo),
                PassiveTransportsInfo    = CloneBuidingBlockInfo(simulationToClone.MoBiBuildConfiguration.PassiveTransportsInfo),
                ObserversInfo            = CloneBuidingBlockInfo(simulationToClone.MoBiBuildConfiguration.ObserversInfo),
                EventGroupsInfo          = CloneBuidingBlockInfo(simulationToClone.MoBiBuildConfiguration.EventGroupsInfo),
                ParameterStartValuesInfo = CloneBuidingBlockInfo(simulationToClone.MoBiBuildConfiguration.ParameterStartValuesInfo),
                MoleculeStartValuesInfo  = CloneBuidingBlockInfo(simulationToClone.MoBiBuildConfiguration.MoleculeStartValuesInfo),
                SimulationSettingsInfo   = CloneBuidingBlockInfo(simulationToClone.MoBiBuildConfiguration.SimulationSettingsInfo)
            };

            var model      = _cloneManagerForModel.CloneModel(simulationToClone.Model);
            var simulation = _simulationFactory.CreateFrom(buildConfig, model);

            simulation.UpdatePropertiesFrom(simulationToClone, _cloneManagerForModel);
            return(simulation);
        }