本文整理汇总了C#中IExpression.Dispatch方法的典型用法代码示例。如果您正苦于以下问题:C# IExpression.Dispatch方法的具体用法?C# IExpression.Dispatch怎么用?C# IExpression.Dispatch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IExpression
的用法示例。
在下文中一共展示了IExpression.Dispatch方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Traverse
/// <summary>
/// Traverses the expression.
/// </summary>
public void Traverse(IExpression expression)
{
Contract.Requires(expression != null);
expression.Dispatch(this.dispatchingVisitor);
}
示例2: Visit
/// <summary>
/// Traverses the given expression.
/// </summary>
/// <param name="expression"></param>
public virtual void Visit(IExpression expression)
{
if (this.stopTraversal) return;
expression.Dispatch(this);
}
示例3: Substitute
/// <summary>
/// A dispatcher method that calls the type-specific Substitute for <paramref name="expression"/>.
/// </summary>
/// <param name="expression"></param>
/// <returns></returns>
public virtual IExpression Substitute(IExpression expression)
{
expression.Dispatch(this.createMutableType);
return this.createMutableType.resultExpression;
}
示例4: Copy
/// <summary>
/// Returns a shallow copy of the given expression.
/// </summary>
/// <param name="expression"></param>
public Expression Copy(IExpression expression)
{
expression.Dispatch(this.Dispatcher);
return (Expression)this.Dispatcher.result;
}
示例5: Copy
/// <summary>
/// Returns a shallow copy of the given expression.
/// </summary>
/// <param name="expression"></param>
public Expression Copy(IExpression expression) {
Contract.Requires(expression != null);
Contract.Ensures(Contract.Result<Expression>() != null);
expression.Dispatch(this.Dispatcher);
return (Expression)this.Dispatcher.result;
}
示例6: Rewrite
/// <summary>
/// Rewrites the given expression.
/// </summary>
/// <param name="expression"></param>
public virtual IExpression Rewrite(IExpression expression)
{
expression.Dispatch(this.dispatchingVisitor);
return (IExpression)this.dispatchingVisitor.result;
}