InstantReactionLoader.loadInstantReactions C# (CSharp) Method

loadInstantReactions() public method

public loadInstantReactions ( XmlNode node, LinkedList reactions ) : bool
node XmlNode
reactions LinkedList
return bool
    public bool loadInstantReactions(XmlNode node, LinkedList<IReaction> reactions)
    {
        XmlNodeList IReactionsList = node.SelectNodes("instantReaction");
        bool b = true;

        foreach (XmlNode IReaction in IReactionsList)
          {
        InstantReaction ir = new InstantReaction();
        foreach (XmlNode attr in IReaction)
          {
            switch (attr.Name)
              {
              case "name":
                ir.setName(attr.InnerText);
                break;
              case "reactants":
                loadInstantReactionReactants(attr, ir);
                break;
              case "products":
                loadInstantReactionProducts(attr, ir);
                break;
              }
          }
        reactions.AddLast(ir);
          }
        return b;
    }