public static CompilableProvider Rewrite(CompilableProvider provider, ApplyParameter oldParameter, ApplyParameter newParameter)
        {
            var expressionRewriter = new ApplyParameterRewriter(oldParameter, newParameter);
            var providerRewriter   = new CompilableProviderVisitor(expressionRewriter.RewriteExpression);

            return(providerRewriter.VisitCompilable(provider));
        }
        public static Expression Rewrite(Expression expression,
                                         ApplyParameter oldParameter, ApplyParameter newParameter)
        {
            var expressionRewriter = new ApplyParameterRewriter(oldParameter, newParameter);

            return(expressionRewriter.Visit(expression));
        }