public override Expression CloneExpressionOnly()
        {
            InitializerExpression initializerClone = Initializer != null?Initializer.CloneExpressionOnly() as InitializerExpression : null;

            AnonymousObjectCreationExpression result = new AnonymousObjectCreationExpression(Constructor, Type, initializerClone, null);

            return(result);
        }
예제 #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);
        }
        public override Expression CloneExpressionOnly()
        {
            InitializerExpression initializerClone = Initializer != null?Initializer.CloneExpressionOnly() as InitializerExpression : null;

            ObjectCreationExpression result = new ObjectCreationExpression(Constructor, Type, initializerClone, null)
            {
                Arguments = this.Arguments.CloneExpressionsOnly()
            };

            return(result);
        }
        public override Expression CloneExpressionOnly()
        {
            InitializerExpression initializerClone = Initializer != null ? (InitializerExpression)Initializer.CloneExpressionOnly() : null;

            return(new ArrayCreationExpression(ElementType, initializerClone, null)
            {
                Dimensions = Dimensions.CloneExpressionsOnly()
            });
        }