本文整理汇总了C#中System.Linq.Expressions.ExpressionVisitor.VisitExtension方法的典型用法代码示例。如果您正苦于以下问题:C# ExpressionVisitor.VisitExtension方法的具体用法?C# ExpressionVisitor.VisitExtension怎么用?C# ExpressionVisitor.VisitExtension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Linq.Expressions.ExpressionVisitor
的用法示例。
在下文中一共展示了ExpressionVisitor.VisitExtension方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Accept
/// <summary>
/// Accepts the specified visitor, by default dispatching to <see cref="ExpressionVisitor.VisitExtension"/>.
/// Inheritors of the <see cref="ExtensionExpression"/> class can override this method in order to dispatch to a specific Visit method.
/// </summary>
/// <param name="visitor">The visitor whose Visit method should be invoked.</param>
/// <returns>The <see cref="Expression"/> returned by the visitor.</returns>
/// <remarks>
/// Overriders can test the <paramref name="visitor"/> for a specific interface. If the visitor supports the interface, the extension expression
/// can dispatch to the respective strongly-typed Visit method declared in the interface. If it does not, the extension expression should call
/// the base implementation of <see cref="Accept"/>, which will dispatch to <see cref="ExpressionVisitor.VisitExtension"/>.
/// </remarks>
protected virtual Expression Accept (ExpressionVisitor visitor)
{
ArgumentUtility.CheckNotNull ("visitor", visitor);
return visitor.VisitExtension (this);
}