Promoter.buildPromoterFromProps C# (CSharp) Method

buildPromoterFromProps() public static method

public static buildPromoterFromProps ( PromoterProprieties, props ) : IReaction,
props PromoterProprieties,
return IReaction,
    public static IReaction buildPromoterFromProps(PromoterProprieties props)
    {
        PromoterParser parser = new PromoterParser();
        Promoter reaction = new Promoter();

        reaction.setName(props.name);
        reaction.setBeta(props.beta);
        reaction.setTerminatorFactor(props.terminatorFactor);
        TreeNode<PromoterNodeData> formula = parser.Parse(props.formula);
        reaction.setFormula(formula);
        Product newProd;
        foreach (Product p in props.products)
          {
        newProd = new Product(p);
        reaction.addProduct(newProd);
          }
        return reaction;
    }