/// <summary> /// Returns true if ResponseInstruction instances are equal /// </summary> /// <param name="input">Instance of ResponseInstruction to be compared</param> /// <returns>Boolean</returns> public bool Equals(ResponseInstruction input) { if (input == null) { return(false); } return (( Text == input.Text || (Text != null && Text.Equals(input.Text)) ) && ( StreetName == input.StreetName || (StreetName != null && StreetName.Equals(input.StreetName)) ) && ( Distance == input.Distance || (Distance != null && Distance.Equals(input.Distance)) ) && ( Time == input.Time || (Time != null && Time.Equals(input.Time)) ) && ( Interval == input.Interval || Interval != null && Interval.SequenceEqual(input.Interval) ) && ( Sign == input.Sign || (Sign != null && Sign.Equals(input.Sign)) ) && ( AnnotationText == input.AnnotationText || (AnnotationText != null && AnnotationText.Equals(input.AnnotationText)) ) && ( AnnotationImportance == input.AnnotationImportance || (AnnotationImportance != null && AnnotationImportance.Equals(input.AnnotationImportance)) ) && ( ExitNumber == input.ExitNumber || (ExitNumber != null && ExitNumber.Equals(input.ExitNumber)) ) && ( TurnAngle == input.TurnAngle || (TurnAngle != null && TurnAngle.Equals(input.TurnAngle)) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Text != null) { hashCode = hashCode * 59 + Text.GetHashCode(); } if (StreetName != null) { hashCode = hashCode * 59 + StreetName.GetHashCode(); } if (Distance != null) { hashCode = hashCode * 59 + Distance.GetHashCode(); } if (Time != null) { hashCode = hashCode * 59 + Time.GetHashCode(); } if (Interval != null) { hashCode = hashCode * 59 + Interval.GetHashCode(); } if (Sign != null) { hashCode = hashCode * 59 + Sign.GetHashCode(); } if (AnnotationText != null) { hashCode = hashCode * 59 + AnnotationText.GetHashCode(); } if (AnnotationImportance != null) { hashCode = hashCode * 59 + AnnotationImportance.GetHashCode(); } if (ExitNumber != null) { hashCode = hashCode * 59 + ExitNumber.GetHashCode(); } if (TurnAngle != null) { hashCode = hashCode * 59 + TurnAngle.GetHashCode(); } return(hashCode); } }