Table of Contents

Class PredicateExpressionVisitor<T>

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Expression visitor whose traversal is driven by a caller-supplied predicate.

public class PredicateExpressionVisitor<T> : ExpressionVisitor

Type Parameters

T

The entity type the predicate is evaluated against.

Inheritance
PredicateExpressionVisitor<T>
Inherited Members
Extension Methods

Constructors

PredicateExpressionVisitor(Func<Expression?, Func<T, bool>, bool>)

Expression visitor whose traversal is driven by a caller-supplied predicate.

public PredicateExpressionVisitor(Func<Expression?, Func<T, bool>, bool> predicate)

Parameters

predicate Func<Expression, Func<T, bool>, bool>

Receives the current node and a compiled predicate for T.

Properties

Result

Whether the caller-supplied predicate matched a node during the visit.

public bool Result { get; }

Property Value

bool

Value

The value captured by the predicate through its store callback, if any.

public T? Value { get; }

Property Value

T

Methods

Visit(Expression?)

Invokes the caller-supplied predicate for each node; on a match it records the result and stops, otherwise it continues the base traversal.

public override Expression? Visit(Expression? node)

Parameters

node Expression

The current node.

Returns

Expression

The node, or the result of the base visit.