Esempio n. 1
0
        /// <summary>
        /// Initialises a new instance of the ModuleMetadataTableRow class
        /// </summary>
        /// <param name="contents">The byte contents of the file</param>
        /// <param name="offset">The offset of this row</param>
        public ModuleMetadataTableRow(byte[] contents, Offset offset, IIndexDetails indexDetails)
        {
            this.FileOffset = offset;

            byte sizeOfGuidIndex = indexDetails.GetSizeOfGuidIndex();

            _generation = FieldReader.ToUInt16(contents, offset.Shift(2));
            _name       = new StringIndex(contents, indexDetails.GetSizeOfStringIndex(), offset);
            _mvid       = FieldReader.ToInt32(contents, offset.Shift(sizeOfGuidIndex), sizeOfGuidIndex);
            _encId      = FieldReader.ToInt32(contents, offset.Shift(sizeOfGuidIndex), sizeOfGuidIndex);
            _encBaseId  = FieldReader.ToInt32(contents, offset.Shift(sizeOfGuidIndex), sizeOfGuidIndex);
        }