/// <summary> /// Initializes a new instance of the <see cref="ScopedDictionary<TKey, TValue>"/> class. /// </summary> /// <param name="previous">The previous.</param> public ScopedDictionary(ScopedDictionary <TKey, TValue> previous) { this.previous = previous; this.map = new Dictionary <TKey, TValue>(); }
/// <summary> /// Ares the equal. /// </summary> /// <param name="parameterScope">The parameter scope.</param> /// <param name="a">A.</param> /// <param name="b">The b.</param> /// <returns></returns> public static bool AreEqual(ScopedDictionary <ParameterExpression, ParameterExpression> parameterScope, Expression a, Expression b) { return(new ExpressionComparer(parameterScope, null).Compare(a, b)); }
/// <summary> /// Ares the equal. /// </summary> /// <param name="parameterScope">The parameter scope.</param> /// <param name="a">A.</param> /// <param name="b">The b.</param> /// <param name="fnCompare">The fn compare.</param> /// <returns></returns> public static bool AreEqual(ScopedDictionary <ParameterExpression, ParameterExpression> parameterScope, Expression a, Expression b, Func <object, object, bool> fnCompare) { return(new ExpressionComparer(parameterScope, fnCompare).Compare(a, b)); }
/// <summary> /// Initializes a new instance of the <see cref="ExpressionComparer"/> class. /// </summary> /// <param name="parameterScope">The parameter scope.</param> /// <param name="fnCompare">The fn compare.</param> protected ExpressionComparer(ScopedDictionary <ParameterExpression, ParameterExpression> parameterScope, Func <object, object, bool> fnCompare) { this.parameterScope = parameterScope; this.fnCompare = fnCompare; }