Expression.Accept(ExpressionVisitor) 方法

定義

分派給這個節點類型的特定造訪方法。Dispatches to the specific visit method for this node type. 例如,MethodCallExpression 會呼叫 VisitMethodCall(MethodCallExpression)For example, MethodCallExpression calls the VisitMethodCall(MethodCallExpression).

protected public:
 virtual System::Linq::Expressions::Expression ^ Accept(System::Linq::Expressions::ExpressionVisitor ^ visitor);
protected internal virtual System.Linq.Expressions.Expression Accept (System.Linq.Expressions.ExpressionVisitor visitor);
abstract member Accept : System.Linq.Expressions.ExpressionVisitor -> System.Linq.Expressions.Expression
override this.Accept : System.Linq.Expressions.ExpressionVisitor -> System.Linq.Expressions.Expression
Protected Friend Overridable Function Accept (visitor As ExpressionVisitor) As Expression

參數

visitor
ExpressionVisitor

瀏覽這個節點的造訪者。The visitor to visit this node with.

傳回

Expression

瀏覽這個節點的結果。The result of visiting this node.

備註

節點的這個預設執行會 Extension 呼叫 VisitExtensionThis default implementation for Extension nodes calls VisitExtension. 覆寫這個方法,在類別的衍生訪客類別上呼叫更明確的方法 ExpressionVisitorOverride this method to call into a more specific method on a derived visitor class of the ExpressionVisitor class. 不過,它仍應藉由呼叫來支援未知的訪客 VisitExtensionHowever, it should still support unknown visitors by calling VisitExtension.

適用於