Beispiel #1
0
        public override void ReadXml(XmlReader reader)
        {
            var isEmptyElement = reader.IsEmptyElement;

            var packagePathHash = new FoxHash("packagePathHash");

            packagePathHash.ReadXml(reader);
            var archivePathHash = new FoxHash("archivePathHash");

            archivePathHash.ReadXml(reader);
            var nameInArchiveHash = new FoxHash("nameInArchiveHash");

            nameInArchiveHash.ReadXml(reader);

            var packagePath   = reader.GetAttribute("packagePath");
            var archivePath   = reader.GetAttribute("archivePath");
            var nameInArchive = reader.GetAttribute("nameInArchive");

            PackagePathLiteral   = new FoxStringLiteral(packagePath, packagePathHash);
            ArchivePathLiteral   = new FoxStringLiteral(archivePath, archivePathHash);
            NameInArchiveLiteral = new FoxStringLiteral(nameInArchive, nameInArchiveHash);

            reader.ReadStartElement("value");
            if (isEmptyElement == false)
            {
                string value = reader.ReadString();
                EntityHandle = value.StartsWith("0x")
                    ? ulong.Parse(value.Substring(2, value.Length - 2), NumberStyles.AllowHexSpecifier)
                    : ulong.Parse(value);
                reader.ReadEndElement();
            }
        }
Beispiel #2
0
        public override void ReadXml(XmlReader reader)
        {
            var isEmptyElement = reader.IsEmptyElement;

            var packagePathHash = new FoxHash("packagePathHash");
            packagePathHash.ReadXml(reader);
            var archivePathHash = new FoxHash("archivePathHash");
            archivePathHash.ReadXml(reader);
            var nameInArchiveHash = new FoxHash("nameInArchiveHash");
            nameInArchiveHash.ReadXml(reader);

            var packagePath = reader.GetAttribute("packagePath");
            var archivePath = reader.GetAttribute("archivePath");
            var nameInArchive = reader.GetAttribute("nameInArchive");

            PackagePathLiteral = new FoxStringLiteral(packagePath, packagePathHash);
            ArchivePathLiteral = new FoxStringLiteral(archivePath, archivePathHash);
            NameInArchiveLiteral = new FoxStringLiteral(nameInArchive, nameInArchiveHash);

            reader.ReadStartElement("value");
            if (isEmptyElement == false)
            {
                string value = reader.ReadString();
                EntityHandle = value.StartsWith("0x")
                    ? ulong.Parse(value.Substring(2, value.Length - 2), NumberStyles.AllowHexSpecifier)
                    : ulong.Parse(value);
                reader.ReadEndElement();
            }
        }
Beispiel #3
0
 public void ReadXml(XmlReader reader)
 {
     var isEmptyElement = reader.IsEmptyElement;
     FoxHash hash = new FoxHash();
     hash.ReadXml(reader);
     reader.ReadStartElement("value");
     string literal = null;
     if (isEmptyElement == false)
     {
         literal = reader.ReadContentAsString();
         reader.ReadEndElement();
     }
     StringLiteral = new FoxStringLiteral(literal, hash);
 }
Beispiel #4
0
 public void Read(Stream input, short valueCount)
 {
     for (int i = 0; i < valueCount; i++)
     {
         FoxHash hash = FoxHash.ReadFoxHash(input);
         FoxStringLookupLiteral key = new FoxStringLookupLiteral
         {
             Hash = hash
         };
         T value = new T();
         value.Read(input);
         input.AlignRead(16);
         _map.Add(key, value);
     }
 }
Beispiel #5
0
        public void ReadXml(XmlReader reader)
        {
            var     isEmptyElement = reader.IsEmptyElement;
            FoxHash hash           = new FoxHash();

            hash.ReadXml(reader);
            reader.ReadStartElement("value");
            string literal = null;

            if (isEmptyElement == false)
            {
                literal = reader.ReadContentAsString();
                reader.ReadEndElement();
            }
            StringLiteral = new FoxStringLiteral(literal, hash);
        }