ClrHeader
Namespace: Dotsider.Core.Analysis.Models
Assembly: Dotsider.Core.dll
CLR (Common Language Runtime) header information from the PE file’s COR20 header.
public sealed record ClrHeader : IEquatable<ClrHeader>Inheritance
Section titled “Inheritance”Object → ClrHeader
Implements
Section titled “Implements”Constructors
Section titled “Constructors”ClrHeader(int, int, int, int, CorFlags, int, int, int, int, int, DirectoryEntry)
Section titled “ClrHeader(int, int, int, int, CorFlags, int, int, int, int, int, DirectoryEntry)”CLR (Common Language Runtime) header information from the PE file’s COR20 header.
Parameters:
MajorRuntimeVersion(Int32): Major version of the CLR required.MinorRuntimeVersion(Int32): Minor version of the CLR required.MetadataRva(Int32): RVA of the metadata directory.MetadataSize(Int32): Size of the metadata directory in bytes.Flags(CorFlags): CLR header flags (ILOnly, 32BitRequired, StrongNameSigned, etc.).EntryPointToken(Int32): Metadata token of the entry point method, or zero.ResourcesRva(Int32): RVA of the managed resources directory.ResourcesSize(Int32): Size of the managed resources directory.StrongNameSignatureRva(Int32): RVA of the strong name signature.StrongNameSignatureSize(Int32): Size of the strong name signature.ManagedNativeHeader(DirectoryEntry): The managed native header directory. Non-empty for precompiled images: a crossgen2 ReadyToRun image points it at theREADYTORUN_HEADER. Empty (Size == 0) for a plain managed assembly.
public ClrHeader(int MajorRuntimeVersion, int MinorRuntimeVersion, int MetadataRva, int MetadataSize, CorFlags Flags, int EntryPointToken, int ResourcesRva, int ResourcesSize, int StrongNameSignatureRva, int StrongNameSignatureSize, DirectoryEntry ManagedNativeHeader)ClrHeader(int, int, int, int, CorFlags, int, int, int, int, int)
Section titled “ClrHeader(int, int, int, int, CorFlags, int, int, int, int, int)”Constructs a header without a managed native header directory. Preserves the original ten-argument shape for callers written before ManagedNativeHeader was added.
Parameters:
majorRuntimeVersion(Int32)minorRuntimeVersion(Int32)metadataRva(Int32)metadataSize(Int32)flags(CorFlags)entryPointToken(Int32)resourcesRva(Int32)resourcesSize(Int32)strongNameSignatureRva(Int32)strongNameSignatureSize(Int32)
public ClrHeader(int majorRuntimeVersion, int minorRuntimeVersion, int metadataRva, int metadataSize, CorFlags flags, int entryPointToken, int resourcesRva, int resourcesSize, int strongNameSignatureRva, int strongNameSignatureSize)Properties
Section titled “Properties”EntryPointToken
Section titled “EntryPointToken”Metadata token of the entry point method, or zero.
Returns: Int32
public int EntryPointToken { get; init; }CLR header flags (ILOnly, 32BitRequired, StrongNameSigned, etc.).
Returns: CorFlags
public CorFlags Flags { get; init; }MajorRuntimeVersion
Section titled “MajorRuntimeVersion”Major version of the CLR required.
Returns: Int32
public int MajorRuntimeVersion { get; init; }ManagedNativeHeader
Section titled “ManagedNativeHeader”The managed native header directory. Non-empty for precompiled images: a crossgen2 ReadyToRun
image points it at the READYTORUN_HEADER. Empty (Size == 0) for a plain managed assembly.
Returns: DirectoryEntry
public DirectoryEntry ManagedNativeHeader { get; init; }MetadataRva
Section titled “MetadataRva”RVA of the metadata directory.
Returns: Int32
public int MetadataRva { get; init; }MetadataSize
Section titled “MetadataSize”Size of the metadata directory in bytes.
Returns: Int32
public int MetadataSize { get; init; }MinorRuntimeVersion
Section titled “MinorRuntimeVersion”Minor version of the CLR required.
Returns: Int32
public int MinorRuntimeVersion { get; init; }ResourcesRva
Section titled “ResourcesRva”RVA of the managed resources directory.
Returns: Int32
public int ResourcesRva { get; init; }ResourcesSize
Section titled “ResourcesSize”Size of the managed resources directory.
Returns: Int32
public int ResourcesSize { get; init; }StrongNameSignatureRva
Section titled “StrongNameSignatureRva”RVA of the strong name signature.
Returns: Int32
public int StrongNameSignatureRva { get; init; }StrongNameSignatureSize
Section titled “StrongNameSignatureSize”Size of the strong name signature.
Returns: Int32
public int StrongNameSignatureSize { get; init; }Methods
Section titled “Methods”Deconstruct(out int, out int, out int, out int, out CorFlags, out int, out int, out int, out int, out int, out DirectoryEntry)
Section titled “Deconstruct(out int, out int, out int, out int, out CorFlags, out int, out int, out int, out int, out int, out DirectoryEntry)”Parameters:
MajorRuntimeVersion(Int32)MinorRuntimeVersion(Int32)MetadataRva(Int32)MetadataSize(Int32)Flags(CorFlags)EntryPointToken(Int32)ResourcesRva(Int32)ResourcesSize(Int32)StrongNameSignatureRva(Int32)StrongNameSignatureSize(Int32)ManagedNativeHeader(DirectoryEntry)
public void Deconstruct(out int MajorRuntimeVersion, out int MinorRuntimeVersion, out int MetadataRva, out int MetadataSize, out CorFlags Flags, out int EntryPointToken, out int ResourcesRva, out int ResourcesSize, out int StrongNameSignatureRva, out int StrongNameSignatureSize, out DirectoryEntry ManagedNativeHeader)Deconstruct(out int, out int, out int, out int, out CorFlags, out int, out int, out int, out int, out int)
Section titled “Deconstruct(out int, out int, out int, out int, out CorFlags, out int, out int, out int, out int, out int)”Deconstructs the original ten fields, preserving the pre-ManagedNativeHeader positional shape for existing deconstruction sites.
Parameters:
majorRuntimeVersion(Int32)minorRuntimeVersion(Int32)metadataRva(Int32)metadataSize(Int32)flags(CorFlags)entryPointToken(Int32)resourcesRva(Int32)resourcesSize(Int32)strongNameSignatureRva(Int32)strongNameSignatureSize(Int32)
public void Deconstruct(out int majorRuntimeVersion, out int minorRuntimeVersion, out int metadataRva, out int metadataSize, out CorFlags flags, out int entryPointToken, out int resourcesRva, out int resourcesSize, out int strongNameSignatureRva, out int strongNameSignatureSize)Equals(ClrHeader?)
Section titled “Equals(ClrHeader?)”Parameters:
other(ClrHeader)
Returns: Boolean
public bool Equals(ClrHeader? other)Equals(object?)
Section titled “Equals(object?)”Parameters:
obj(Object)
Returns: Boolean
public override bool Equals(object? obj)GetHashCode()
Section titled “GetHashCode()”Returns: Int32
public override int GetHashCode()ToString()
Section titled “ToString()”Returns: String
public override string ToString()Members
Section titled “Members”operator !=(ClrHeader?, ClrHeader?)
Section titled “operator !=(ClrHeader?, ClrHeader?)”Parameters:
Returns: Boolean
public static bool operator !=(ClrHeader? left, ClrHeader? right)operator ==(ClrHeader?, ClrHeader?)
Section titled “operator ==(ClrHeader?, ClrHeader?)”Parameters:
Returns: Boolean
public static bool operator ==(ClrHeader? left, ClrHeader? right)