internal BinXmlElementNoAttribute(byte[] bytes, int chunkOffset, ref int offset) { Token = (BinaryXml.TOKEN_TYPE)bytes[offset]; DependencyId = BitConverter.ToInt16(bytes, offset + 0x01); DataSize = BitConverter.ToInt32(bytes, offset + 0x03); ElementNameOffset = BitConverter.ToInt32(bytes, offset + 0x07); ElementName = new BinXmlName(bytes, chunkOffset + ElementNameOffset); CloseStartTag = (BinaryXml.TOKEN_TYPE)bytes[offset + HeaderSize + BinXmlName.HeaderSize + (ElementName.NameSize * 0x02)]; int valueOffset = offset + HeaderSize + BinXmlName.HeaderSize + (ElementName.NameSize * 0x02) + 0x01; ValueTag = (BinaryXml.TOKEN_TYPE)bytes[valueOffset]; if (ValueTag == BinaryXml.TOKEN_TYPE.BinXmlTokenValue) { ValueText = new BinXmlValueText(bytes, offset); } else { Substitution = new BinXmlSubstitution(bytes, valueOffset); } ElementEndToken = (BinaryXml.TOKEN_TYPE)bytes[offset + this.DataSize + 0x07 - 0x01]; offset += this.DataSize + 0x07; }
internal BinXmlElementAttribute(byte[] bytes, int chunkOffset, ref int offset) { Token = (BinaryXml.TOKEN_TYPE)bytes[offset]; DependencyId = BitConverter.ToInt16(bytes, offset + 0x01); DataSize = BitConverter.ToInt32(bytes, offset + 0x03); ElementNameOffset = BitConverter.ToInt32(bytes, offset + 0x07); ElementName = new BinXmlName(bytes, chunkOffset + ElementNameOffset); int attributeListOffset = offset + HeaderSize + BinXmlName.HeaderSize + (ElementName.NameSize * 0x02); //AttributeList = new BinXmlAttributeList(bytes, chunkOffset, attributeListOffset); ElementEndToken = (BinaryXml.TOKEN_TYPE)bytes[offset + this.DataSize + 0x07 - 0x01]; offset += this.DataSize + 0x07; }
internal BinXmlAttribute(byte[] bytes, int chunkOffset, int offset) { Token = (BinaryXml.TOKEN_TYPE)bytes[offset]; AttributeNameOffset = BitConverter.ToInt32(bytes, offset + 0x01); Name = new BinXmlName(bytes, chunkOffset + AttributeNameOffset); }