Пример #1
0
        private static TExpr ReplaceExpressions <TExpr>(TExpr expression, Expression orig, Expression replacement)
            where TExpr : Expression
        {
            var replacer = new ExpressionReplacer(orig, replacement);

            return(replacer.VisitAndConvert(expression, nameof(ReplaceExpressions)));
        }
            public static T Replace <T> (T expression, Expression replace, Expression with) where T : Expression
            {
                var replacer = new ExpressionReplacer(replace, with);

                return(replacer.VisitAndConvert(expression, nameof(Replace)));
            }