本文整理汇总了C#中Ast.InternalVisit方法的典型用法代码示例。如果您正苦于以下问题:C# Ast.InternalVisit方法的具体用法?C# Ast.InternalVisit怎么用?C# Ast.InternalVisit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ast
的用法示例。
在下文中一共展示了Ast.InternalVisit方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FindAllUsingExpressionExceptForWorkflow
internal static IEnumerable<Ast> FindAllUsingExpressionExceptForWorkflow(Ast ast)
{
Diagnostics.Assert(ast != null, "caller to verify arguments");
var searcher = new UsingExpressionAstSearcher(astParam => astParam is UsingExpressionAst, stopOnFirst: false, searchNestedScriptBlocks: true);
ast.InternalVisit(searcher);
return searcher.Results;
}
示例2: IsInNestedScriptBlock
public static bool IsInNestedScriptBlock(Ast ast, LineBreakpoint breakpoint)
{
var visitor = new CheckBreakpointInScript { _breakpoint = breakpoint };
ast.InternalVisit(visitor);
return visitor._result;
}
示例3: FindFirst
internal static Ast FindFirst(Ast ast, Func<Ast, bool> predicate, bool searchNestedScriptBlocks)
{
AstSearcher visitor = new AstSearcher(predicate, true, searchNestedScriptBlocks);
ast.InternalVisit(visitor);
return visitor.Results.FirstOrDefault<Ast>();
}
示例4: FindAll
internal static IEnumerable<Ast> FindAll(Ast ast, Func<Ast, bool> predicate, bool searchNestedScriptBlocks)
{
AstSearcher visitor = new AstSearcher(predicate, false, searchNestedScriptBlocks);
ast.InternalVisit(visitor);
return visitor.Results;
}
示例5: FindAllUsingExpressionExceptForWorkflow
internal static IEnumerable<Ast> FindAllUsingExpressionExceptForWorkflow(Ast ast)
{
UsingExpressionAstSearcher visitor = new UsingExpressionAstSearcher(astParam => astParam is UsingExpressionAst, false, true);
ast.InternalVisit(visitor);
return visitor.Results;
}
示例6: Contains
internal static bool Contains(Ast ast, Func<Ast, bool> predicate, bool searchNestedScriptBlocks)
{
Diagnostics.Assert(ast != null && predicate != null, "caller to verify arguments");
var searcher = new AstSearcher(predicate, stopOnFirst: true, searchNestedScriptBlocks: searchNestedScriptBlocks);
ast.InternalVisit(searcher);
return searcher.Results.FirstOrDefault() != null;
}
示例7: FindAll
internal static IEnumerable<Ast> FindAll(Ast ast, Func<Ast, bool> predicate, bool searchNestedScriptBlocks)
{
Diagnostics.Assert(ast != null && predicate != null, "caller to verify arguments");
var searcher = new AstSearcher(predicate, stopOnFirst: false, searchNestedScriptBlocks: searchNestedScriptBlocks);
ast.InternalVisit(searcher);
return searcher.Results;
}