/// <summary> /// Normalizes the specified expression. This method is typically used to process expressions prior to further processing by a service. /// </summary> /// <param name="expression">Expression to normalize.</param> /// <returns>Normalized expression.</returns> public virtual Expression Normalize(Expression expression) { if (expression == null) { throw new ArgumentNullException(nameof(expression)); } var inlinedExpressions = new ExpressionInliner(this).Inline(expression); var uriBased = _knownResourceRewriter.Rewrite(inlinedExpressions); var simplified = SimplifyUriForms(uriBased); var convertsRewritten = new ConvertedGlobalParameterRewriter().Visit(simplified); var betaReduced = BetaReducer.Reduce(convertsRewritten); return(betaReduced); }
public Impl(ExpressionInliner parent) => _parent = parent;