Thinktecture.Tools.Web.Services.CodeGeneration.Rpc2DocumentLiteralTranslator.BuildItems C# (CSharp) Method

BuildItems() private method

private BuildItems ( XmlNamespaceManager nsmgr ) : bool
nsmgr System.Xml.XmlNamespaceManager
return bool
        private bool BuildItems(XmlNamespaceManager nsmgr)
        {
            XmlNodeList list = GetAffectedBindings();
            if (list == null)
            {
                return false;
            }
            else
            {
                foreach(XmlElement n in list)
                {
                    store.Bindings.Add(n.Attributes["name"].Value, new R2DBinding(n, nsmgr));
                }
            }
            list = GetAffectedPortTypes();
            if (list != null)
            {
                foreach(XmlElement n in  list)
                {
                    store.PortTypes.Add(n.Attributes["name"].Value, new R2DPortType(n, nsmgr));
                }
            }
            list = GetAffectedOperations();
            if (list != null)
            {
                foreach(XmlElement n in  list)
                {
                    store.Operations.Add(n.Attributes["name"].Value, new R2DOperation(n, nsmgr));
                }
            }
            list = GetAffectedInputMessages();
            if (list != null)
            {
                foreach(XmlElement n in  list)
                {
                    store.InputMessages.Add(n.Attributes["name"].Value, new R2DMessage(n, nsmgr));
                }
            }
            list = GetAffectedOutputMessages();
            if (list != null)
            {
                foreach(XmlElement n in  list)
                {
                    store.OutputMessages.Add(n.Attributes["name"].Value, new R2DMessage(n, nsmgr));
                }
            }
            list = GetAffectedInputTypes();
            if (list != null)
            {
                foreach(XmlElement n in  list)
                {
                    string typeNameAttributeName = "type";
                    if (n.Attributes["element"] != null)
                    {
                        typeNameAttributeName = "element";
                    }
                    try
                    {
                        store.Types.Add(n.ParentNode.Attributes["name"].Value + "/" + n.Attributes[typeNameAttributeName].Value, new R2DType(n, n.Attributes[typeNameAttributeName].Value, nsmgr));
                    }
                    catch (ArgumentException)
                    {
                        // that's fine
                    }
                }
            }
            list = GetAffectedOutputTypes();
            if (list != null)
            {
                foreach(XmlElement n in  list)
                {
                    string typeNameAttributeName = "type";
                    if (n.Attributes["element"] != null)
                    {
                        typeNameAttributeName = "element";
                    }
                    try
                    {
                        store.Types.Add(n.ParentNode.Attributes["name"].Value + "/" + n.Attributes[typeNameAttributeName].Value, new R2DType(n, n.Attributes[typeNameAttributeName].Value, nsmgr));
                    }
                    catch (ArgumentException)
                    {
                        // that's fine
                    }
                }
            }
            store.SetupRelations(this);
            return true;
        }