Exemplo n.º 1
0
        internal bool HasNonTrailingExitSelects(SyntaxNode node, ExitStatementSyntax trailing)
        {
            var exit = node as ExitStatementSyntax;

            if ((exit != null && exit.BlockKeyword.IsKind(SyntaxKind.SelectKeyword)) && (trailing == null || !node.GetLocation().Equals(trailing.GetLocation())))
            {
                return(true);
            }
            return(node.DescendantNodes().Any(n => HasNonTrailingExitSelects(n, trailing)));
        }
Exemplo n.º 2
0
 public override void VisitExitStatement(ExitStatementSyntax node)
 {
     base.VisitExitStatement(node);
     this.walker.StoreVisitData(node, this.walker.ConditionalTerminates, this.walker.UnconditionalTerminates);
 }
Exemplo n.º 3
0
 public void Render(ExitStatementSyntax exitStatement)
 {
     Render(exitStatement.ExitwhenKeywordToken);
     WriteSpace();
     Render(exitStatement.ConditionExpressionNode);
 }
Exemplo n.º 4
0
 public override void VisitExitStatement(ExitStatementSyntax node)
 {
     LogicalLineCount++;
     base.VisitExitStatement(node);
 }
 internal bool HasNonTrailingExitSelects(SyntaxNode node, ExitStatementSyntax trailing)
 {
     var exit = node as ExitStatementSyntax;
     if ((exit != null && exit.BlockKeyword.IsKind(SyntaxKind.SelectKeyword)) && (trailing == null || !node.GetLocation().Equals(trailing.GetLocation())))
         return true;
     return node.DescendantNodes().Any(n => HasNonTrailingExitSelects(n, trailing));
 }