Class ParserExecutionContextHasher<TContext>
Computes deterministic structural execution-state keys for generated parser execution contexts.
public static class ParserExecutionContextHasher<TContext> where TContext : class
Type Parameters
TContextThe parser execution-context type to hash.
- Inheritance
-
ParserExecutionContextHasher<TContext>
- Inherited Members
Remarks
Instance fields are inspected in a stable order. Static fields and field-like event backing fields are ignored, matching ParserExecutionContextCopier<TContext>. Auto-property backing fields are normal instance fields and therefore participate in the state key. Complex user objects must implement IParserExecutionStateHashable explicitly; otherwise an exception is thrown instead of falling back to reference identity or GetHashCode().
Methods
GetKey(TContext)
Computes a parser execution-state key for context.
public static ParserExecutionStateKey GetKey(TContext context)
Parameters
contextTContextThe context instance whose state is hashed.
Returns
- ParserExecutionStateKey
A structural key representing the current context state.
Exceptions
- ArgumentNullException
contextis null.- InvalidOperationException
A field contains an unsupported complex object.