/// <summary> /// Returns true if <paramref name="a"/> and <paramref name="b"/> are equal. /// </summary> /// <param name="a">The first object</param> /// <param name="b">The second object</param> /// <returns>true if <paramref name="a"/> and <paramref name="b"/> are equal.</returns> public static bool AreEqual(ConditionExpression a, ConditionExpression b) { if (a == null && b == null) { return(true); } if (a != null || b != null) { return(false); } if (a.Equals(b)) { return(true); } if (!string.Equals(a.AttributeName, b.AttributeName)) { return(false); } if (!string.Equals(a.EntityName, b.EntityName)) { return(false); } if (a.Operator != b.Operator) { return(false); } if (!AreEqual(a.Values, b.Values)) { return(false); } return(true); }
public Expression Update(Expression body, Expression condition) { if (Body.Equals(body) && ConditionExpression.Equals(condition)) { return(this); } return(AstExpression.While(_whileStatement, this, Visitor)); }
public override bool Equals(object other) { if (null == ConditionExpression || null == TrueExpression || null == FalseExpression) { return(false); } var otherNode = other as InlineConditionalNode; if (null == otherNode) { return(false); } return(ConditionExpression.Equals(otherNode.ConditionExpression) && TrueExpression.Equals(otherNode.TrueExpression) && FalseExpression.Equals(otherNode.FalseExpression)); }