예제 #1
0
 public override void VisitIfStatement(IfStatementSyntax node)
 {
     if (entryPoint.IsMethodLevel() && node.IsParent <AnonymousFunctionExpressionSyntax>())
     {
         return;
     }
     noscounter++;
     base.VisitIfStatement(node);
 }
예제 #2
0
            public override void VisitIfStatement(IfStatementSyntax node)
            {
                if (entryPoint.IsMethodLevel() && node.IsParent <AnonymousFunctionExpressionSyntax>())
                {
                    return;
                }

                EligibleForNLE(node);

                if (node.Parent.Kind() != SyntaxKind.ElseClause)
                {
                    IncreaseHeight();
                }
                EmbeddednessConsideredToIncrease();
                base.VisitIfStatement(node);
                if (node.Parent.Kind() != SyntaxKind.ElseClause)
                {
                    currentNL--;
                }
                EmbeddednessConsideredToDecrease();
            }