Class PredicateExpressionVisitor<T>
Expression visitor whose traversal is driven by a caller-supplied predicate.
public class PredicateExpressionVisitor<T> : ExpressionVisitor
Type Parameters
TThe 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
predicateFunc<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
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
nodeExpressionThe current node.
Returns
- Expression
The node, or the result of the base visit.