Class MemoryFieldProbe<T>
- Namespace
- CStructSharp.Memory
- Assembly
- CStructSharp.dll
One immutable typed field requirement and a caller-owned predicate, evaluated over captured bytes.
public sealed class MemoryFieldProbe<T>
Type Parameters
TExact managed field type.
- Inheritance
-
MemoryFieldProbe<T>
- Inherited Members
Remarks
Compose probes in application order. No callback is reordered, skipped or converted into statistical confidence. Predicates must themselves be safe for concurrent reuse when callers share a probe.
Constructors
MemoryFieldProbe(string, MemoryFieldReader<T>, Func<T, bool>)
Prepares a named requirement without retaining bytes or operation state.
public MemoryFieldProbe(string ruleId, MemoryFieldReader<T> reader, Func<T, bool> predicate)
Parameters
ruleIdstringStable application rule identifier for retained evidence.
readerMemoryFieldReader<T>Schema-bound fixed field reader.
predicateFunc<T, bool>Application predicate; invoked only after every storage byte is known. Exceptions propagate.
Properties
Reader
Gets the prepared reader, including required field path and byte extent.
public MemoryFieldReader<T> Reader { get; }
Property Value
RuleId
Gets the identifier connecting fast checks to retained application evidence.
public string RuleId { get; }
Property Value
Methods
Evaluate(ReadOnlySpan<byte>, MemoryAccessContext, MemoryValidity?)
Evaluates exactly this rule, distinguishing unknown storage from rejection.
public MemoryProbeOutcome Evaluate(ReadOnlySpan<byte> bytes, MemoryAccessContext context, MemoryValidity? validity = null)
Parameters
bytesReadOnlySpan<byte>Stable bytes beginning at the root coordinate.
contextMemoryAccessContextShared local work budget and cancellation.
validityMemoryValidityOptional known-byte intervals of this buffer.
Returns
- MemoryProbeOutcome
Local match, mismatch or unavailable evidence.