Expression.VisitChildren(ExpressionVisitor) 方法
定义
简化节点,然后对简化的表达式调用访问者委托。Reduces the node and then calls the visitor delegate on the reduced expression. 该方法在节点不可简化时引发异常。The method throws an exception if the node is not reducible.
protected public:
virtual System::Linq::Expressions::Expression ^ VisitChildren(System::Linq::Expressions::ExpressionVisitor ^ visitor);
protected internal virtual System.Linq.Expressions.Expression VisitChildren (System.Linq.Expressions.ExpressionVisitor visitor);
abstract member VisitChildren : System.Linq.Expressions.ExpressionVisitor -> System.Linq.Expressions.Expression
override this.VisitChildren : System.Linq.Expressions.ExpressionVisitor -> System.Linq.Expressions.Expression
Protected Friend Overridable Function VisitChildren (visitor As ExpressionVisitor) As Expression
参数
- visitor
- ExpressionVisitor
Func<T,TResult> 的一个实例。An instance of Func<T,TResult>.
返回
要访问的表达式,或应在树中替换此表达式的表达式。The expression being visited, or an expression which should replace it in the tree.
注解
重写此方法可提供逻辑来遍历节点的子节点。Override this method to provide logic to walk the node's children. 典型的实现将调用访问者。访问其每个子项,如果其中任何一个项发生更改,则应使用修改后的子级返回其自身的新副本。A typical implementation will call visitor.Visit on each of its children, and if any of them change, should return a new copy of itself with the modified children.