Table of Contents

Class ParserExecutionContextHasher<TContext>

Namespace
Utils.Parser.Runtime
Assembly
Utils.Parser.dll

Computes deterministic structural execution-state keys for generated parser execution contexts.

public static class ParserExecutionContextHasher<TContext> where TContext : class

Type Parameters

TContext

The 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

context TContext

The context instance whose state is hashed.

Returns

ParserExecutionStateKey

A structural key representing the current context state.

Exceptions

ArgumentNullException

context is null.

InvalidOperationException

A field contains an unsupported complex object.