Table of Contents

Class PreparedExpressionSemanticPredicate

Namespace
Utils.Parser.Expressions
Assembly
Utils.Parser.Expressions.dll

Represents an expression-backed semantic predicate that was compiled during embedded-code preparation.

public sealed class PreparedExpressionSemanticPredicate
Inheritance
PreparedExpressionSemanticPredicate
Inherited Members
Extension Methods

Constructors

PreparedExpressionSemanticPredicate(EmbeddedCodeSource, EmbeddedCodePreparationContext, Func<SemanticPredicateEvaluationContext, bool>)

Initializes a new prepared semantic predicate artifact.

public PreparedExpressionSemanticPredicate(EmbeddedCodeSource source, EmbeddedCodePreparationContext preparationContext, Func<SemanticPredicateEvaluationContext, bool> predicate)

Parameters

source EmbeddedCodeSource

Embedded-code source that produced this artifact.

preparationContext EmbeddedCodePreparationContext

Preparation context used to compile this artifact.

predicate Func<SemanticPredicateEvaluationContext, bool>

Compiled predicate delegate that evaluates against the current runtime context.

Exceptions

ArgumentNullException

Thrown when any required argument is null.

Properties

PreparationContext

Gets the preparation context used to compile this artifact.

public EmbeddedCodePreparationContext PreparationContext { get; }

Property Value

EmbeddedCodePreparationContext

Source

Gets the embedded-code source that produced this artifact.

public EmbeddedCodeSource Source { get; }

Property Value

EmbeddedCodeSource

Methods

Evaluate(SemanticPredicateEvaluationContext)

Evaluates the compiled predicate against the supplied runtime context without recompiling source text.

public SemanticPredicateEvaluationOutcome Evaluate(SemanticPredicateEvaluationContext context)

Parameters

context SemanticPredicateEvaluationContext

Current parser runtime context.

Returns

SemanticPredicateEvaluationOutcome

A semantic predicate outcome compatible with parser runtime policy results.