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