Пример #1
0
        /// <inheritdoc />
        protected override void Initialize()
        {
            var headers = new MetadataStreamHeader[_numberOfStreams];

            for (int i = 0; i < _numberOfStreams; i++)
            {
                headers[i] = MetadataStreamHeader.FromReader(_entriesReader);
            }

            for (int i = 0; i < _numberOfStreams; i++)
            {
                var header       = headers[i];
                var streamReader = _metadataReader.Fork(_metadataReader.FileOffset + header.Offset, headers[i].Size);
                Items.Add(_metadataStreamReader.ReadStream(header, streamReader));
            }
        }
Пример #2
0
 public IMetadataStream ReadStream(MetadataStreamHeader header, IBinaryStreamReader reader)
 {
     return(header.Name == KoiStreamName
         ? new KoiStream(KoiStreamName, new DataSegment(reader.ReadToEnd()), Logger)
         : _reader.ReadStream(header, reader));
 }
Пример #3
0
 public IMetadataStream ReadStream(PEReaderContext context, MetadataStreamHeader header, ref BinaryStreamReader reader)
 {
     return(header.Name == KoiStreamName
         ? new KoiStream(KoiStreamName, new DataSegment(reader.ReadToEnd()), Logger)
         : _reader.ReadStream(context, header, ref reader));
 }