public override void VisitIfStatement(IfStatementSyntax node)
        {
            base.VisitIfStatement(node);
            CyclomaticComplexityAnalyzer cyclomaticComplexityAnalyzer = this;

            cyclomaticComplexityAnalyzer.counter = checked (cyclomaticComplexityAnalyzer.counter + 1);
        }
        public override void VisitInitializerExpression(InitializerExpressionSyntax node)
        {
            base.VisitInitializerExpression(node);
            CyclomaticComplexityAnalyzer cyclomaticComplexityAnalyzer = this;

            cyclomaticComplexityAnalyzer.counter = checked (cyclomaticComplexityAnalyzer.counter + 1);
        }
        public override void VisitElseClause(ElseClauseSyntax node)
        {
            base.VisitElseClause(node);
            CyclomaticComplexityAnalyzer cyclomaticComplexityAnalyzer = this;

            cyclomaticComplexityAnalyzer.counter = checked (cyclomaticComplexityAnalyzer.counter + 1);
        }
        public override void VisitSwitchSection(SwitchSectionSyntax node)
        {
            base.VisitSwitchSection(node);
            CyclomaticComplexityAnalyzer cyclomaticComplexityAnalyzer = this;

            cyclomaticComplexityAnalyzer.counter = checked (cyclomaticComplexityAnalyzer.counter + 1);
        }
 public override void VisitConditionalExpression(ConditionalExpressionSyntax node)
 {
     base.VisitConditionalExpression(node);
     if (node.QuestionToken.Kind() == SyntaxKind.QuestionToken && node.ColonToken.Kind() == SyntaxKind.ColonToken)
     {
         CyclomaticComplexityAnalyzer cyclomaticComplexityAnalyzer = this;
         cyclomaticComplexityAnalyzer.counter = checked (cyclomaticComplexityAnalyzer.counter + 1);
     }
 }
 public override void VisitBinaryExpression(BinaryExpressionSyntax node)
 {
     base.VisitBinaryExpression(node);
     if (node.OperatorToken.Kind() == SyntaxKind.QuestionQuestionToken)
     {
         CyclomaticComplexityAnalyzer cyclomaticComplexityAnalyzer = this;
         cyclomaticComplexityAnalyzer.counter = checked (cyclomaticComplexityAnalyzer.counter + 1);
     }
 }
        public int Calculate(MemberNode node)
        {
            BlockSyntax blockSyntax  = MemberBodySelector.FindBody(node);
            BlockSyntax blockSyntax1 = blockSyntax;

            if (blockSyntax != null)
            {
                this.Visit(blockSyntax1);
            }
            int num = CyclomaticComplexityAnalyzer.CalculateLogicalComplexity(node);

            return(checked (this.counter + num));
        }