Пример #1
0
 private static SlabSourceFile[] LoadSlabBindingSourceFiles(XmlNode node)
 {
     if (node.LocalName != "sources" && node.LocalName != "packagedSources" && node.LocalName != "strings")
     {
         throw new SlabManifestFormatException(string.Format("sources or packagedSources node expected. Found {0}", node.LocalName));
     }
     SlabSourceFile[] array = new SlabSourceFile[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");
         if (attributeValue != null)
         {
             array[i] = new SlabSourceFile
             {
                 Name   = attributeValue,
                 Layout = SlabManifestLoader.GetResourceLayout(attributeValue2)
             };
         }
     }
     return(array);
 }
Пример #2
0
        public override bool Equals(object obj)
        {
            SlabSourceFile slabSourceFile = obj as SlabSourceFile;

            return(slabSourceFile != null && this.Name == slabSourceFile.Name && base.Equals(obj));
        }