public void StandAloneSig_WhenCreated_OffsetIsMovedOn()
        {
            IIndexDetails indexDetails = IndexHelper.CreateIndexDetails(2);

            byte[] contents = new byte[2];
            Offset offset   = 0;

            StandAloneSigMetadataTableRow row = new StandAloneSigMetadataTableRow(contents, offset, indexDetails);

            Assert.AreEqual(2, offset.Current);
        }
        public void StandAloneSig_WhenCreated_FieldsAreReadCorrectly()
        {
            IIndexDetails indexDetails = IndexHelper.CreateIndexDetails(2);

            byte[] contents = new byte[] {
                0x01, 0x00
            };
            Offset offset = 0;

            StandAloneSigMetadataTableRow row = new StandAloneSigMetadataTableRow(contents, offset, indexDetails);

            Assert.AreEqual(1, row.Signiture.Value);
        }
Ejemplo n.º 3
0
 public StandAloneSigEntry(MetadataDirectory directory, StandAloneSigMetadataTableRow row)
 {
     this.FileOffset = string.Format("0x{0:x}", row.FileOffset);
     this.Signiture  = string.Format("0x{0:x}", row.Signiture.Value);
 }