/// <summary> /// Checks the equality of objects. /// </summary> /// <param name="obj">Object to be checked.</param> /// <returns>True if the objects are equal, false otherwise.</returns> public override bool Equals(object obj) { PreferenceExpression other = obj as PreferenceExpression; if (other == null) { return(false); } return((PreferenceNameId == other.PreferenceNameId) && Child.Equals(other.Child)); }
/// <summary> /// Visits and transforms the expression. /// </summary> /// <param name="expression">Source expression.</param> /// <returns>Transformed expression.</returns> public override IExpression Visit(PreferenceExpression expression) { return(expression.Child.Accept(this)); }
/// <summary> /// Visits the expression. /// </summary> /// <param name="expression">Expression.</param> public void Visit(PreferenceExpression expression) { expression.Child.Accept(this); }
/// <summary> /// Visits and transforms the expression. /// </summary> /// <param name="expression">Source expression.</param> /// <returns>Transformed expression.</returns> public IExpression Visit(PreferenceExpression expression) { return(new PreferenceExpression(expression.PreferenceNameId, expression.Accept(this), IdManager)); }