public override void VisitEmptyStatement(EmptyStatementSyntax node) { base.VisitEmptyStatement(node); StatementsAnalyzer statementsAnalyzer = this; statementsAnalyzer.counter = checked (statementsAnalyzer.counter + 1); }
public override void VisitUsingDirective(UsingDirectiveSyntax node) { base.VisitUsingDirective(node); StatementsAnalyzer statementsAnalyzer = this; statementsAnalyzer.counter = checked (statementsAnalyzer.counter + 1); }
public override void VisitLocalDeclarationStatement(LocalDeclarationStatementSyntax node) { base.VisitLocalDeclarationStatement(node); StatementsAnalyzer statementsAnalyzer = this; statementsAnalyzer.counter = checked (statementsAnalyzer.counter + 1); }
public override void VisitInitializerExpression(InitializerExpressionSyntax node) { base.VisitInitializerExpression(node); StatementsAnalyzer count = this; count.counter = checked (count.counter + node.Expressions.Count); }
private void CalculateConstructorStatements(MemberNode node) { if (node.Kind == MemberKind.Constructor) { ConstructorDeclarationSyntax syntaxNode = node.SyntaxNode as ConstructorDeclarationSyntax; ConstructorDeclarationSyntax constructorDeclarationSyntax = syntaxNode; if (syntaxNode != null && constructorDeclarationSyntax.Initializer != null) { this.Visit(constructorDeclarationSyntax.Initializer); StatementsAnalyzer statementsAnalyzer = this; statementsAnalyzer.counter = checked (statementsAnalyzer.counter + 1); } } }
private void CalculateCompilerGeneratedPropertyStatements(MemberNode node) { switch (node.Kind) { case MemberKind.GetProperty: case MemberKind.SetProperty: { if (MemberBodySelector.FindBody(node) == null) { StatementsAnalyzer statementsAnalyzer = this; statementsAnalyzer.counter = checked (statementsAnalyzer.counter + 1); } return; } default: { return; } } }