RynthCore/tools/HookResolver.Core/Symbols/HookSymbol.cs
Tom Bohar 68c301dac8 RynthCore as of 2026-09-05 (internal f9abab9)
A snapshot of the working tree for aelrynth.com/git/: the code, build files
and public docs. Internal review notes and agent instructions are left out.
MIT licensed; see LICENSE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:22:59 -04:00

26 lines
813 B
C#

using System.Collections.Generic;
using RynthCore.HookResolver.Core.Validation;
namespace RynthCore.HookResolver.Core.Symbols;
public enum SymbolAnchor
{
AnchorOnPrologue,
AnchorOnBody,
AnchorOnCallSite,
AnchorOnStringRef
}
public sealed record PrologueWalkBack(byte[] Prologue, int MaxDistance = 0x100);
public sealed record HookSymbol
{
public required string Id { get; init; }
public required string PatternId { get; init; }
public required byte?[] Pattern { get; init; }
public int? FallbackVa { get; init; }
public required SymbolAnchor Anchor { get; init; }
public PrologueWalkBack? WalkBack { get; init; }
public IReadOnlyList<IValidationRule> RequiredRules { get; init; } = [];
public IReadOnlyList<IValidationRule> AdvisoryRules { get; init; } = [];
}