public static Expression Quote(Expression expression, object hoistedLocals, object[] locals) { Debug.Assert(hoistedLocals != null && locals != null); var quoter = new ExpressionQuoter((HoistedLocals)hoistedLocals, locals); return(quoter.Visit(expression)); }
/// <summary> /// Quotes the provided expression tree. /// </summary> /// <param name="expression">The expression to quote.</param> /// <param name="hoistedLocals">The hoisted local state provided by the compiler.</param> /// <param name="locals">The actual hoisted local values.</param> /// <returns>The quoted expression.</returns> // [Obsolete("do not use this method", true), EditorBrowsable(EditorBrowsableState.Never)] public static Expression Quote(Expression expression, object hoistedLocals, object[] locals) { if (hoistedLocals == null) { throw new ArgumentNullException(nameof(hoistedLocals)); } if (locals == null) { throw new ArgumentNullException(nameof(locals)); } var quoter = new ExpressionQuoter((HoistedLocals)hoistedLocals, locals); return(quoter.Visit(expression)); }
public static Expression Quote(Expression expression, object hoistedLocals, object[] locals) { ExpressionQuoter quoter = new ExpressionQuoter((HoistedLocals)hoistedLocals, locals); return(quoter.Visit(expression)); }