Esempio n. 1
0
            public void AddProduct(SpeciesDescription si)
            {
                if (_reaction.Products.Any(p => p.Locale != si.Locale))
                {
                    throw new ArgumentException("All products of a reaction must come from the same locale.");
                }

                _reaction._products.Add(si);
            }
Esempio n. 2
0
            public void AddSpecies(SpeciesDescription species)
            {
                if (_model._species.Where(si => si.Locale == species.Locale).Any(si => si.Name == species.Name))
                {
                    throw new ArgumentException("Species '" + species + "' already exists in the model.");
                }

                _model._species.Add(species);
            }
Esempio n. 3
0
            public void AddReactant(SpeciesDescription si)
            {
                if (_reaction.Reactants.Any(r => r.Locale != si.Locale))
                {
                    throw new ArgumentException("All reactants of a reaction must come from the same locale.");
                }

                _reaction._reactants.Add(si);
            }