ReadMetadata() private method

private ReadMetadata ( ) : void
return void
Esempio n. 1
0
 public static Image ReadPortablePdb(Disposable <Stream> stream, string file_name)
 {
     try
     {
         ImageReader imageReader = new ImageReader(stream, file_name);
         uint        num         = (uint)stream.value.Length;
         imageReader.image.Sections = new Section[1]
         {
             new Section
             {
                 PointerToRawData = 0,
                 SizeOfRawData    = num,
                 VirtualAddress   = 0,
                 VirtualSize      = num
             }
         };
         imageReader.metadata = new DataDirectory(0u, num);
         imageReader.ReadMetadata();
         return(imageReader.image);
     }
     catch (EndOfStreamException inner)
     {
         throw new BadImageFormatException(stream.value.GetFileName(), inner);
     }
 }
Esempio n. 2
0
        public static Image ReadPortablePdb(Disposable <Stream> stream, string file_name)
        {
            try {
                var reader = new ImageReader(stream, file_name);
                var length = (uint)stream.value.Length;

                reader.image.Sections = new[] {
                    new Section {
                        PointerToRawData = 0,
                        SizeOfRawData    = length,
                        VirtualAddress   = 0,
                        VirtualSize      = length,
                    }
                };

                reader.metadata = new DataDirectory(0, length);
                reader.ReadMetadata();
                return(reader.image);
            } catch (EndOfStreamException e) {
                throw new BadImageFormatException(stream.value.GetFileName(), e);
            }
        }
Esempio n. 3
0
        public static Image ReadPortablePdb(Disposable<Stream> stream, string file_name)
        {
            try {
                var reader = new ImageReader (stream, file_name);
                var length = (uint) stream.value.Length;

                reader.image.Sections = new[] {
                    new Section {
                        PointerToRawData = 0,
                        SizeOfRawData = length,
                        VirtualAddress = 0,
                        VirtualSize = length,
                    }
                };

                reader.metadata = new DataDirectory (0, length);
                reader.ReadMetadata ();
                return reader.image;
            } catch (EndOfStreamException e) {
                throw new BadImageFormatException (stream.value.GetFileName (), e);
            }
        }