private static void InitializeNetDirectory(ImageNetDirectory directory) { directory.Cb = 0x48; directory.MajorRuntimeVersion = 2; directory.Flags = ImageNetDirectoryFlags.IlOnly; InitializeMetadata(directory.MetadataHeader); }
internal static ImageNetDirectory FromReadingContext(ReadingContext context) { var reader = context.Reader; var directory = new ImageNetDirectory { _readingContext = context, StartOffset = reader.Position, Cb = reader.ReadUInt32(), MajorRuntimeVersion = reader.ReadUInt16(), MinorRuntimeVersion = reader.ReadUInt16(), MetadataDirectory = ImageDataDirectory.FromReadingContext(context), Flags = (ImageNetDirectoryFlags)reader.ReadUInt32(), EntryPointToken = reader.ReadUInt32(), ResourcesDirectory = ImageDataDirectory.FromReadingContext(context), StrongNameSignatureDirectory = ImageDataDirectory.FromReadingContext(context), CodeManagerTableDirectory = ImageDataDirectory.FromReadingContext(context), VTableFixupsDirectory = ImageDataDirectory.FromReadingContext(context), ExportAddressTableJumpsDirectory = ImageDataDirectory.FromReadingContext(context), ManagedNativeHeaderDirectory = ImageDataDirectory.FromReadingContext(context), }; return(directory); }
public MetadataHeader(ImageNetDirectory directory) : this() { NetDirectory = directory; }
internal static ImageNetDirectory FromReadingContext(ReadingContext context) { var reader = context.Reader; var directory = new ImageNetDirectory { _readingContext = context, StartOffset = reader.Position, Cb = reader.ReadUInt32(), MajorRuntimeVersion = reader.ReadUInt16(), MinorRuntimeVersion = reader.ReadUInt16(), MetadataDirectory = ImageDataDirectory.FromReadingContext(context), Flags = (ImageNetDirectoryFlags)reader.ReadUInt32(), EntryPointToken = reader.ReadUInt32(), ResourcesDirectory = ImageDataDirectory.FromReadingContext(context), StrongNameSignatureDirectory = ImageDataDirectory.FromReadingContext(context), CodeManagerTableDirectory = ImageDataDirectory.FromReadingContext(context), VTableFixupsDirectory = ImageDataDirectory.FromReadingContext(context), ExportAddressTableJumpsDirectory = ImageDataDirectory.FromReadingContext(context), ManagedNativeHeaderDirectory = ImageDataDirectory.FromReadingContext(context), }; return directory; }