public static ImageDebugDirectory FromReadingContext(ReadingContext context) { var reader = context.Reader; var directory = new ImageDebugDirectory() { StartOffset = reader.StartPosition, Characteristics = reader.ReadUInt32(), TimeDateStamp = reader.ReadUInt32(), MajorVersion = reader.ReadUInt16(), MinorVersion = reader.ReadUInt16(), Type = (DebugInformationFormat)reader.ReadUInt32(), SizeOfData = reader.ReadUInt32(), AddressOfRawData = reader.ReadUInt32(), PointerToRawData = reader.ReadUInt32(), }; directory._dataReadingContext = context.CreateSubContext(directory.PointerToRawData, (int)directory.SizeOfData); return directory; }