Ejemplo n.º 1
0
        public override Statement CloneStatementOnly()
        {
            BlockStatement clonedBody = body != null?body.CloneStatementOnly() as BlockStatement : null;

            LockStatement result = new LockStatement(Expression.CloneExpressionOnly(), clonedBody, null);

            CopyParentAndLabel(result);
            return(result);
        }
Ejemplo n.º 2
0
        public override Statement CloneStatementOnly()
        {
            BlockStatement clonedBody = body != null?body.CloneStatementOnly() as BlockStatement : null;

            ForStatement result = new ForStatement(Initializer.CloneExpressionOnly(), Condition.CloneExpressionOnly(), Increment.CloneExpressionOnly(), clonedBody);

            result.ConditionBlock = null;
            CopyParentAndLabel(result);
            return(result);
        }
Ejemplo n.º 3
0
        public override Statement CloneStatementOnly()
        {
            BlockStatement clonedBody = body != null?body.CloneStatementOnly() as BlockStatement : null;

            DoWhileStatement result = new DoWhileStatement(this.Condition.CloneExpressionOnly(), clonedBody);

            result.ConditionBlock = null;
            CopyParentAndLabel(result);
            return(result);
        }
Ejemplo n.º 4
0
        public override Statement CloneStatementOnly()
        {
            BlockStatement clonedBody = Body != null?body.CloneStatementOnly() as BlockStatement : null;

            ForEachStatement result = new ForEachStatement(Variable.CloneExpressionOnly() as VariableDeclarationExpression,
                                                           Collection.CloneExpressionOnly(), clonedBody, null, null);

            CopyParentAndLabel(result);
            return(result);
        }
Ejemplo n.º 5
0
        public override Statement CloneStatementOnly()
        {
            BlockStatement clonedThen = then != null?then.CloneStatementOnly() as BlockStatement : null;

            BlockStatement clonedElse = @else != null? @else.CloneStatementOnly() as BlockStatement : null;

            IfStatement result = new IfStatement(Condition.CloneExpressionOnly(), clonedThen, clonedElse);

            CopyParentAndLabel(result);
            return(result);
        }
Ejemplo n.º 6
0
        public override Statement CloneStatementOnly()
        {
            BlockStatement clonnedTry = @try != null? @try.CloneStatementOnly() as BlockStatement : null;

            BlockStatement clonnedfault = fault != null?fault.CloneStatementOnly() as BlockStatement : null;

            FinallyClause clonnedFinally = @finally != null? @finally.CloneStatementOnly() as FinallyClause : null;

            TryStatement result = new TryStatement(clonnedTry, clonnedfault, clonnedFinally);

            foreach (CatchClause @catch in this.catchClauses)
            {
                result.AddToCatchClauses((CatchClause)@catch.CloneStatementOnly());
            }
            CopyParentAndLabel(result);
            return(result);
        }