public static bool TryCreate(
            BinaryExpressionSyntax binaryExpression,
            out BinaryExpressionChain result)
        {
            List <ExpressionSyntax> expressions = GetExpressions(binaryExpression, binaryExpression.Kind());

            if (expressions != null)
            {
                expressions.Reverse();
                result = new BinaryExpressionChain(binaryExpression, expressions);
                return(true);
            }

            result = default(BinaryExpressionChain);
            return(false);
        }
        public static bool TryCreate(
            SyntaxNode node,
            SyntaxKind binaryExpressionKind,
            out BinaryExpressionChain result)
        {
            var binaryExpression = node as BinaryExpressionSyntax;

            if (binaryExpression?.Kind() == binaryExpressionKind)
            {
                List <ExpressionSyntax> expressions = GetExpressions(binaryExpression, binaryExpressionKind);

                if (expressions != null)
                {
                    expressions.Reverse();
                    result = new BinaryExpressionChain(binaryExpression, expressions);
                    return(true);
                }
            }

            result = default(BinaryExpressionChain);
            return(false);
        }