Table of Contents

Class ParseResult

Namespace
CStructSharp.Values
Assembly
CStructSharp.dll

The outcome of a debug parse: the selected struct exactly as Parse returns it, plus one DebugData record per value the reader produced, in read order.

public sealed record ParseResult : IEquatable<ParseResult>
Inheritance
ParseResult
Implements
Inherited Members

Constructors

ParseResult(StructValue, IReadOnlyList<DebugData>)

The outcome of a debug parse: the selected struct exactly as Parse returns it, plus one DebugData record per value the reader produced, in read order.

public ParseResult(StructValue Value, IReadOnlyList<DebugData> Debug)

Parameters

Value StructValue

The parsed struct; the same object Parse would return for the same path.

Debug IReadOnlyList<DebugData>

The byte range, path, type, and decoded value of every item read, including the root's members.

Properties

Debug

The byte range, path, type, and decoded value of every item read, including the root's members.

public IReadOnlyList<DebugData> Debug { get; init; }

Property Value

IReadOnlyList<DebugData>

Value

The parsed struct; the same object Parse would return for the same path.

public StructValue Value { get; init; }

Property Value

StructValue

Methods

Deconstruct(out StructValue, out IReadOnlyList<DebugData>)

Splits the result into its value and its debug records, in that order.

public void Deconstruct(out StructValue value, out IReadOnlyList<DebugData> debug)

Parameters

value StructValue

Receives Value.

debug IReadOnlyList<DebugData>

Receives Debug.

Equals(ParseResult?)

public bool Equals(ParseResult? other)

Parameters

other ParseResult

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ParseResult?, ParseResult?)

public static bool operator ==(ParseResult? left, ParseResult? right)

Parameters

left ParseResult
right ParseResult

Returns

bool

operator !=(ParseResult?, ParseResult?)

public static bool operator !=(ParseResult? left, ParseResult? right)

Parameters

left ParseResult
right ParseResult

Returns

bool