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 override void Read(Stream input)
 {
     BinaryReader reader = new BinaryReader(input, Encoding.Default, true);
     PackagePathLiteral = FoxStringLiteral.ReadStringLiteral(input);
     ArchivePathLiteral = FoxStringLiteral.ReadStringLiteral(input);
     NameInArchiveLiteral = FoxStringLiteral.ReadStringLiteral(input);
     EntityHandle = reader.ReadUInt64();
 }
Beispiel #4
0
        public override void Read(Stream input)
        {
            BinaryReader reader = new BinaryReader(input, Encoding.Default, true);

            PackagePathLiteral   = FoxStringLiteral.ReadStringLiteral(input);
            ArchivePathLiteral   = FoxStringLiteral.ReadStringLiteral(input);
            NameInArchiveLiteral = FoxStringLiteral.ReadStringLiteral(input);
            EntityHandle         = reader.ReadUInt64();
        }
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);
 }
Beispiel #6
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 #7
0
 public override int Size()
 {
     return(3 * FoxStringLiteral.Size() + sizeof(ulong));
 }
Beispiel #8
0
 public void Read(Stream input)
 {
     StringLiteral = FoxStringLiteral.ReadStringLiteral(input);
 }
Beispiel #9
0
 public int Size()
 {
     return(FoxStringLiteral.Size());
 }
Beispiel #10
0
 public void Read(Stream input)
 {
     StringLiteral = FoxStringLiteral.ReadStringLiteral(input);
 }