Class MemoryWalkResult
- Namespace
- CStructSharp.Memory
- Assembly
- CStructSharp.dll
What a bounded traversal visited and why it stopped, with the structured failure when memory was unavailable.
public sealed record MemoryWalkResult : IEquatable<MemoryWalkResult>
- Inheritance
-
MemoryWalkResult
- Implements
- Inherited Members
Remarks
Nodes lists the regions the walk visited, in order, before it stopped. It is a list of locations, not of decoded records; the callback decides which bytes it reads at each one. In a tree, a node is recorded before its children are requested, so a node whose child lookup failed still appears. Always look at Stop before treating the list as complete: a partial list is useful evidence about a corrupt or truncated image, but it must never silently stand in for a full inventory. Failure is set only for an Unavailable stop.
Constructors
MemoryWalkResult(IReadOnlyList<MemoryRegion>, MemoryWalkStop, MemoryAccessException?)
What a bounded traversal visited and why it stopped, with the structured failure when memory was unavailable.
public MemoryWalkResult(IReadOnlyList<MemoryRegion> Nodes, MemoryWalkStop Stop, MemoryAccessException? Failure = null)
Parameters
NodesIReadOnlyList<MemoryRegion>Visited regions in traversal order.
StopMemoryWalkStopWhy the traversal stopped.
FailureMemoryAccessExceptionThe memory failure that ended the walk, or null for every other stop reason.
Remarks
Nodes lists the regions the walk visited, in order, before it stopped. It is a list of locations, not of decoded records; the callback decides which bytes it reads at each one. In a tree, a node is recorded before its children are requested, so a node whose child lookup failed still appears. Always look at Stop before treating the list as complete: a partial list is useful evidence about a corrupt or truncated image, but it must never silently stand in for a full inventory. Failure is set only for an Unavailable stop.
Properties
Failure
The memory failure that ended the walk, or null for every other stop reason.
public MemoryAccessException? Failure { get; init; }
Property Value
Nodes
Visited regions in traversal order.
public IReadOnlyList<MemoryRegion> Nodes { get; init; }
Property Value
Stop
Why the traversal stopped.
public MemoryWalkStop Stop { get; init; }
Property Value
Methods
Deconstruct(out IReadOnlyList<MemoryRegion>, out MemoryWalkStop, out MemoryAccessException?)
public void Deconstruct(out IReadOnlyList<MemoryRegion> Nodes, out MemoryWalkStop Stop, out MemoryAccessException? Failure)
Parameters
NodesIReadOnlyList<MemoryRegion>StopMemoryWalkStopFailureMemoryAccessException
Equals(MemoryWalkResult?)
public bool Equals(MemoryWalkResult? other)
Parameters
otherMemoryWalkResult
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(MemoryWalkResult?, MemoryWalkResult?)
public static bool operator ==(MemoryWalkResult? left, MemoryWalkResult? right)
Parameters
leftMemoryWalkResultrightMemoryWalkResult
Returns
operator !=(MemoryWalkResult?, MemoryWalkResult?)
public static bool operator !=(MemoryWalkResult? left, MemoryWalkResult? right)
Parameters
leftMemoryWalkResultrightMemoryWalkResult