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(); } }
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(); } }
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); }
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); }