public static Task <Document> ToStringLiteralAsync(
            Document document,
            StringConcatenationExpressionInfo concatenationInfo,
            bool multiline,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            ExpressionSyntax newExpression = (multiline)
                ? concatenationInfo.ToMultilineStringLiteral()
                : concatenationInfo.ToStringLiteral();

            return(RefactorAsync(document, concatenationInfo, newExpression, cancellationToken));
        }
        public static async Task <Document> RefactorAsync(
            Document document,
            BinaryExpressionSyntax binaryExpression,
            CancellationToken cancellationToken)
        {
            SemanticModel semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);

            StringConcatenationExpressionInfo concatenationInfo = SyntaxInfo.StringConcatenationExpressionInfo(binaryExpression, semanticModel, cancellationToken);

            if (concatenationInfo.Success)
            {
                ExpressionSyntax newNode = null;

                if (concatenationInfo.ContainsLiteralExpression)
                {
                    if (concatenationInfo.ContainsVerbatim &&
                        ContainsMultiLine(concatenationInfo, cancellationToken))
                    {
                        newNode = concatenationInfo.ToMultilineStringLiteral();
                    }
                    else
                    {
                        newNode = concatenationInfo.ToStringLiteral();
                    }
                }
                else
                {
                    newNode = concatenationInfo.ToInterpolatedString();
                }

                newNode = newNode.WithTriviaFrom(binaryExpression);

                return(await document.ReplaceNodeAsync(binaryExpression, newNode, cancellationToken).ConfigureAwait(false));
            }

            Debug.Fail(binaryExpression.ToString());

            return(document);
        }