/// <summary> /// Compares two expressions. /// </summary> /// <param name="expression1">The first expression.</param> /// <param name="expression2">The second expression.</param> public static bool IsExpressionEqual(IExpression expression1, IExpression expression2) { if (expression1.GetType() != expression2.GetType()) { return(false); } IComparableExpression ComparableExpression1 = expression1 as IComparableExpression; Debug.Assert(ComparableExpression1 != null); IComparableExpression ComparableExpression2 = expression2 as IComparableExpression; Debug.Assert(ComparableExpression1 != null); #if DEBUG bool Result1 = ComparableExpression1.IsExpressionEqual(ComparableExpression2); bool Result2 = ComparableExpression2.IsExpressionEqual(ComparableExpression1); Debug.Assert(Result1 == Result2); return(Result1); #else return(ComparableExpression1.IsExpressionEqual(ComparableExpression2)); #endif }
/// <summary> /// Compares two expressions. /// </summary> /// <param name="other">The other expression.</param> public bool IsExpressionEqual(IComparableExpression other) { return(IsExpressionEqual(other as IOldExpression)); }
/// <summary> /// Compares two expressions. /// </summary> /// <param name="other">The other expression.</param> public bool IsExpressionEqual(IComparableExpression other) { return(IsExpressionEqual(other as IBinaryConditionalExpression)); }
/// <summary> /// Compares two expressions. /// </summary> /// <param name="other">The other expression.</param> public bool IsExpressionEqual(IComparableExpression other) { return(IsExpressionEqual(other as IIndexQueryExpression)); }
/// <summary> /// Compares two expressions. /// </summary> /// <param name="other">The other expression.</param> public bool IsExpressionEqual(IComparableExpression other) { return(IsExpressionEqual(other as IManifestNumberExpression)); }
/// <summary> /// Compares two expressions. /// </summary> /// <param name="other">The other expression.</param> public bool IsExpressionEqual(IComparableExpression other) { return(IsExpressionEqual(other as IUnaryOperatorExpression)); }
/// <summary> /// Compares two expressions. /// </summary> /// <param name="other">The other expression.</param> public bool IsExpressionEqual(IComparableExpression other) { return(IsExpressionEqual(other as IAssertionTagExpression)); }
/// <summary> /// Compares two expressions. /// </summary> /// <param name="other">The other expression.</param> public bool IsExpressionEqual(IComparableExpression other) { return(IsExpressionEqual(other as IInitializedObjectExpression)); }
/// <summary> /// Compares two expressions. /// </summary> /// <param name="other">The other expression.</param> public bool IsExpressionEqual(IComparableExpression other) { return(IsExpressionEqual(other as IKeywordEntityExpression)); }
/// <summary> /// Compares two expressions. /// </summary> /// <param name="other">The other expression.</param> public bool IsExpressionEqual(IComparableExpression other) { return(IsExpressionEqual(other as IClassConstantExpression)); }