当前位置: 首页>>代码示例>>C#>>正文


C# Ast.InternalVisit方法代码示例

本文整理汇总了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;
        }
开发者ID:40a,项目名称:PowerShell,代码行数:8,代码来源:ScriptBlockToPowerShell.cs

示例2: IsInNestedScriptBlock

 public static bool IsInNestedScriptBlock(Ast ast, LineBreakpoint breakpoint)
 {
     var visitor = new CheckBreakpointInScript { _breakpoint = breakpoint };
     ast.InternalVisit(visitor);
     return visitor._result;
 }
开发者ID:40a,项目名称:PowerShell,代码行数:6,代码来源:Breakpoint.cs

示例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>();
 }
开发者ID:nickchal,项目名称:pash,代码行数:6,代码来源:AstSearcher.cs

示例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;
 }
开发者ID:nickchal,项目名称:pash,代码行数:6,代码来源:AstSearcher.cs

示例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;
 }
开发者ID:nickchal,项目名称:pash,代码行数:6,代码来源:UsingExpressionAstSearcher.cs

示例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;
        }
开发者ID:40a,项目名称:PowerShell,代码行数:8,代码来源:AstVisitor.cs

示例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;
        }
开发者ID:40a,项目名称:PowerShell,代码行数:8,代码来源:AstVisitor.cs


注:本文中的Ast.InternalVisit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。