private static SlabImageFile[] LoadSlabBindingImageFiles(XmlNode node) { if (node.LocalName != "images") { throw new SlabManifestFormatException(string.Format("images node expected. Found {0}", node.LocalName)); } SlabImageFile[] array = new SlabImageFile[node.ChildNodes.Count]; for (int i = 0; i < node.ChildNodes.Count; i++) { string attributeValue = SlabManifestLoader.GetAttributeValue(node.ChildNodes[i], "name"); string attributeValue2 = SlabManifestLoader.GetAttributeValue(node.ChildNodes[i], "layout"); string attributeValue3 = SlabManifestLoader.GetAttributeValue(node.ChildNodes[i], "type"); if (string.IsNullOrEmpty(attributeValue3)) { throw new SlabManifestFormatException(string.Format("image node requires a type attribute", new object[0])); } if (attributeValue != null) { array[i] = new SlabImageFile { Name = attributeValue, Type = attributeValue3, Layout = SlabManifestLoader.GetResourceLayout(attributeValue2) }; } } return(array); }
public override bool Equals(object obj) { SlabImageFile slabImageFile = obj as SlabImageFile; return(slabImageFile != null && this.Type == slabImageFile.Type && this.Name == slabImageFile.Name && base.Equals(obj)); }