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>.

傳回

Expression

受訪的運算式,或是在樹狀結構中應取代該運算式的運算式。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.

適用於