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
sourceEmbeddedCodeSourceEmbedded-code source that produced this artifact.
preparationContextEmbeddedCodePreparationContextPreparation context used to compile this artifact.
predicateFunc<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
Source
Gets the embedded-code source that produced this artifact.
public EmbeddedCodeSource Source { get; }
Property Value
Methods
Evaluate(SemanticPredicateEvaluationContext)
Evaluates the compiled predicate against the supplied runtime context without recompiling source text.
public SemanticPredicateEvaluationOutcome Evaluate(SemanticPredicateEvaluationContext context)
Parameters
contextSemanticPredicateEvaluationContextCurrent parser runtime context.
Returns
- SemanticPredicateEvaluationOutcome
A semantic predicate outcome compatible with parser runtime policy results.