Exemplo n.º 1
0
 private void finalizeTransportsInNeighborhood(IModel cloneModel, INeighborhood sourceNeighborhood, INeighborhood cloneNeighborhood)
 {
     finalizeTransportsInMoleculeParentContainer(cloneModel, sourceNeighborhood, cloneNeighborhood);
     foreach (var sourceMoleculeContainer in sourceNeighborhood.GetChildren <IContainer>())
     {
         var cloneMoleculeContainer = cloneNeighborhood.GetSingleChildByName <IContainer>(sourceMoleculeContainer.Name);
         finalizeTransportsInMoleculeParentContainer(cloneModel, sourceMoleculeContainer, cloneMoleculeContainer);
     }
 }
        public IContainer NeighborhoodMoleculeContainerFor(INeighborhood neighborhood, string moleculeName)
        {
            var moleculeContainer = neighborhood.GetSingleChildByName <IContainer>(moleculeName);

            if (moleculeContainer == null)
            {
                throw new MissingMoleculeContainerException(moleculeName);
            }

            return(moleculeContainer);
        }