public static bool CanRefactor(
            InvocationExpressionSyntax invocation,
            SemanticModel semanticModel,
            CancellationToken cancellationToken)
        {
            if (SyntaxAnalyzer.IsEnumerableExtensionOrImmutableArrayExtensionMethod(invocation, "Select", 2, semanticModel, cancellationToken))
            {
                ArgumentListSyntax argumentList = invocation.ArgumentList;

                if (argumentList?.IsMissing == false)
                {
                    SeparatedSyntaxList <ArgumentSyntax> arguments = argumentList.Arguments;

                    if (arguments.Count == 1)
                    {
                        ArgumentSyntax argument = arguments.First();

                        ExpressionSyntax expression = argument.Expression;

                        if (expression?.IsMissing == false)
                        {
                            SyntaxKind expressionKind = expression.Kind();

                            if (expressionKind == SyntaxKind.SimpleLambdaExpression)
                            {
                                var lambda = (SimpleLambdaExpressionSyntax)expression;

                                if (CanRefactor(lambda.Parameter, lambda.Body))
                                {
                                    return(true);
                                }
                            }
                            else if (expressionKind == SyntaxKind.ParenthesizedLambdaExpression)
                            {
                                var lambda = (ParenthesizedLambdaExpressionSyntax)expression;

                                ParameterListSyntax parameterList = lambda.ParameterList;

                                if (parameterList != null)
                                {
                                    SeparatedSyntaxList <ParameterSyntax> parameters = parameterList.Parameters;

                                    if (parameters.Count == 1 &&
                                        CanRefactor(parameters.First(), lambda.Body))
                                    {
                                        return(true);
                                    }
                                }
                            }
                        }
                    }
                }
            }

            return(false);
        }