コード例 #1
0
        public override SyntaxNode VisitObjectCreationExpression(ObjectCreationExpressionSyntax node)
        {
            if (IsChangeInObjectCreation)
            {
                return base.VisitObjectCreationExpression(node);
            }

            var found = FindListNode(node);
            if(found == null)
            {
                return base.VisitObjectCreationExpression(node);
            }

            ListToArrayReplacementRewriter rewriter = new ListToArrayReplacementRewriter(true);
            return rewriter.Visit(node);
        }
コード例 #2
0
        public override SyntaxNode VisitObjectCreationExpression(ObjectCreationExpressionSyntax node)
        {
            if (IsChangeInObjectCreation)
            {
                return(base.VisitObjectCreationExpression(node));
            }

            var found = FindListNode(node);

            if (found == null)
            {
                return(base.VisitObjectCreationExpression(node));
            }

            ListToArrayReplacementRewriter rewriter = new ListToArrayReplacementRewriter(true);

            return(rewriter.Visit(node));
        }