public ResourceUnpack(XmlNode node, LinkUnpack linkUnpack) { _linkUnpack = linkUnpack; _xmlNode = node; XmlAttribute attribute = (XmlAttribute)node.Attributes.GetNamedItem("Type"); if (attribute != null) { _valid = Core.ResourceStore.ResourceTypes.Exist(attribute.InnerText); if (_valid) { _resource = Core.ResourceStore.NewResourceTransient(attribute.InnerText); XmlNode propertiesNode = node.FirstChild; foreach (XmlNode propertyNode in propertiesNode.ChildNodes) { SetProperty(propertyNode); } XmlNode linksNode = propertiesNode.NextSibling; foreach (XmlNode link in linksNode.ChildNodes) { AddLink(link); } } } }
private void AddLink(XmlNode node) { LinkUnpack linkUnpack = new LinkUnpack(node, this); if (linkUnpack.Valid) { _links.Add(linkUnpack); } }