MstatSectionPolicy
Namespace: Dotsider.Core.Analysis.Models
Assembly: Dotsider.Core.dll
Decides which of an mstat’s 2.1+ detail sections carry the bytes that the format
double-reports into blob buckets. Every 2.x report sums frozen object, field RVA, and
resource bytes into the ArrayOfFrozenObjects, FieldRvaData, and
ResourceData blobs for back-compat; a reader must pick, per section, either the
detail entries or the bucket blob — never both. Sharing this policy between
SizeAnalyzer, MstatSizeIndex,
and MstatDiffer is what keeps their totals identical.
public readonly record struct MstatSectionPolicy : IEquatable<MstatSectionPolicy>Implements
Section titled “Implements”Constructors
Section titled “Constructors”MstatSectionPolicy(bool, bool, bool)
Section titled “MstatSectionPolicy(bool, bool, bool)”Decides which of an mstat’s 2.1+ detail sections carry the bytes that the format
double-reports into blob buckets. Every 2.x report sums frozen object, field RVA, and
resource bytes into the ArrayOfFrozenObjects, FieldRvaData, and
ResourceData blobs for back-compat; a reader must pick, per section, either the
detail entries or the bucket blob — never both. Sharing this policy between
SizeAnalyzer, MstatSizeIndex,
and MstatDiffer is what keeps their totals identical.
Parameters:
UseFrozenObjects(Boolean): True to take frozen objects from the detail section and exclude theArrayOfFrozenObjectsblob.UseRvaFields(Boolean): True to take field RVA data from the detail section and exclude theFieldRvaDatablob.UseManifestResources(Boolean): True to take resources from the detail section and exclude theResourceDatablob.
public MstatSectionPolicy(bool UseFrozenObjects, bool UseRvaFields, bool UseManifestResources)Properties
Section titled “Properties”UseFrozenObjects
Section titled “UseFrozenObjects”True to take frozen objects from the detail section and exclude the ArrayOfFrozenObjects blob.
Returns: Boolean
public bool UseFrozenObjects { get; init; }UseManifestResources
Section titled “UseManifestResources”True to take resources from the detail section and exclude the ResourceData blob.
Returns: Boolean
public bool UseManifestResources { get; init; }UseRvaFields
Section titled “UseRvaFields”True to take field RVA data from the detail section and exclude the FieldRvaData blob.
Returns: Boolean
public bool UseRvaFields { get; init; }Methods
Section titled “Methods”ExcludedBlobNames()
Section titled “ExcludedBlobNames()”The blob names this policy excludes — the buckets whose bytes are read from a detail section instead.
Returns: IReadOnlySet<String>
The excluded blob names.
public IReadOnlySet<string> ExcludedBlobNames()ForData(MstatData)
Section titled “ForData(MstatData)”The policy for reading one report on its own: each detail section is used when it has entries. A 1.x report has empty detail sections, so everything stays at blob fidelity.
Parameters:
data(MstatData): The report to derive the policy from.
Returns: MstatSectionPolicy
The single-report policy.
public static MstatSectionPolicy ForData(MstatData data)ForPair(MstatData, MstatData)
Section titled “ForPair(MstatData, MstatData)”The policy for comparing two reports, applied to both sides so the same bytes land in the same section everywhere. A detail section is used only when every non-empty side understands it (format 2.1+) and at least one side has entries; otherwise both sides degrade to blob fidelity for that section, which loses no bytes because 2.x double-reports them. Empty (format 0.0) is transparent: it constrains nothing.
Parameters:
Returns: MstatSectionPolicy
The shared policy for both sides.
public static MstatSectionPolicy ForPair(MstatData left, MstatData right)