/// <summary> /// Returns true if DutyAssignmentRedeploymentEvent instances are equal /// </summary> /// <param name="other">Instance of DutyAssignmentRedeploymentEvent to be compared</param> /// <returns>Boolean</returns> public bool Equals(DutyAssignmentRedeploymentEvent other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AssignmentNumber == other.AssignmentNumber || AssignmentNumber != null && AssignmentNumber.Equals(other.AssignmentNumber) ) && ( OriginalDuty == other.OriginalDuty || OriginalDuty != null && OriginalDuty.Equals(other.OriginalDuty) ) && ( NewDuty == other.NewDuty || NewDuty != null && NewDuty.Equals(other.NewDuty) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (AssignmentNumber != null) { hashCode = hashCode * 59 + AssignmentNumber.GetHashCode(); } if (OriginalDuty != null) { hashCode = hashCode * 59 + OriginalDuty.GetHashCode(); } if (NewDuty != null) { hashCode = hashCode * 59 + NewDuty.GetHashCode(); } return(hashCode); } }