コード例 #1
0
        internal static IEnumerable <StatementSyntax> Analyze(
            CSharpCompilation compilation,
            Symbol member,
            BoundNode node,
            BoundNode firstInRegion,
            BoundNode lastInRegion
            )
        {
            var walker = new ExitPointsWalker(
                compilation,
                member,
                node,
                firstInRegion,
                lastInRegion
                );

            try
            {
                bool badRegion = false;
                walker.Analyze(ref badRegion);
                var result = walker._branchesOutOf.ToImmutableAndFree();
                walker._branchesOutOf = null;
                return(badRegion
                  ? SpecializedCollections.EmptyEnumerable <StatementSyntax>()
                  : result);
            }
            finally
            {
                walker.Free();
            }
        }
コード例 #2
0
        internal static ImmutableArray <StatementSyntax> Analyze(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion)
        {
            var walker = new ExitPointsWalker(compilation, member, node, firstInRegion, lastInRegion);

            try
            {
                return(walker.Analyze());
            }
            finally
            {
                walker.Free();
            }
        }
コード例 #3
0
 internal static IEnumerable<StatementSyntax> Analyze(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion)
 {
     var walker = new ExitPointsWalker(compilation, member, node, firstInRegion, lastInRegion);
     try
     {
         bool badRegion = false;
         walker.Analyze(ref badRegion);
         var result = walker._branchesOutOf.ToImmutableAndFree();
         walker._branchesOutOf = null;
         return badRegion ? SpecializedCollections.EmptyEnumerable<StatementSyntax>() : result;
     }
     finally
     {
         walker.Free();
     }
 }