Bloom.Book.BookData.GatherAttributes C# (CSharp) Method

GatherAttributes() private method

private GatherAttributes ( DataSet data, XmlElement node, string key ) : void
data DataSet
node System.Xml.XmlElement
key string
return void
        private void GatherAttributes(DataSet data, XmlElement node, string key)
        {
            if (data.Attributes.ContainsKey(key))
                return;
            List<KeyValuePair<string, string>> attributes = new List<KeyValuePair<string, string>>();
            foreach (XmlAttribute attribute in node.Attributes)
            {
                if (attribute.Name != "data-book-attributes")
                    attributes.Add(new KeyValuePair<string, string>(attribute.Name, attribute.Value));
            }
            data.Attributes.Add(key, attributes);
        }