/// <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 (DutyId != null) { hashCode = hashCode * 59 + DutyId.GetHashCode(); } if (BookingId != null) { hashCode = hashCode * 59 + BookingId.GetHashCode(); } if (AllocatePersonId != null) { hashCode = hashCode * 59 + AllocatePersonId.GetHashCode(); } if (MasterDutyId != null) { hashCode = hashCode * 59 + MasterDutyId.GetHashCode(); } if (SlaveDutyId != null) { hashCode = hashCode * 59 + SlaveDutyId.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Person instances are equal /// </summary> /// <param name="other">Instance of Person to be compared</param> /// <returns>Boolean</returns> public bool Equals(Person other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( Surname == other.Surname || Surname != null && Surname.Equals(other.Surname) ) && ( DateOfBirth == other.DateOfBirth || DateOfBirth != null && DateOfBirth.Equals(other.DateOfBirth) ) && ( PersonGender == other.PersonGender || PersonGender.Equals(other.PersonGender) ) && ( MatchId == other.MatchId || MatchId != null && MatchId.Equals(other.MatchId) ) && ( AllocatePersonId == other.AllocatePersonId || AllocatePersonId != null && AllocatePersonId.Equals(other.AllocatePersonId) ) && ( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( TelephoneNumber == other.TelephoneNumber || TelephoneNumber != null && TelephoneNumber.Equals(other.TelephoneNumber) ) && ( ExtSystemId == other.ExtSystemId || ExtSystemId != null && ExtSystemId.Equals(other.ExtSystemId) )); }
/// <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 (FirstName != null) { hashCode = hashCode * 59 + FirstName.GetHashCode(); } if (Surname != null) { hashCode = hashCode * 59 + Surname.GetHashCode(); } if (DateOfBirth != null) { hashCode = hashCode * 59 + DateOfBirth.GetHashCode(); } hashCode = hashCode * 59 + PersonGender.GetHashCode(); if (MatchId != null) { hashCode = hashCode * 59 + MatchId.GetHashCode(); } if (AllocatePersonId != null) { hashCode = hashCode * 59 + AllocatePersonId.GetHashCode(); } if (Email != null) { hashCode = hashCode * 59 + Email.GetHashCode(); } if (TelephoneNumber != null) { hashCode = hashCode * 59 + TelephoneNumber.GetHashCode(); } if (ExtSystemId != null) { hashCode = hashCode * 59 + ExtSystemId.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if BookingResponse instances are equal /// </summary> /// <param name="other">Instance of BookingResponse to be compared</param> /// <returns>Boolean</returns> public bool Equals(BookingResponse other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( DutyId == other.DutyId || DutyId != null && DutyId.Equals(other.DutyId) ) && ( BookingId == other.BookingId || BookingId != null && BookingId.Equals(other.BookingId) ) && ( AllocatePersonId == other.AllocatePersonId || AllocatePersonId != null && AllocatePersonId.Equals(other.AllocatePersonId) ) && ( MasterDutyId == other.MasterDutyId || MasterDutyId != null && MasterDutyId.Equals(other.MasterDutyId) ) && ( SlaveDutyId == other.SlaveDutyId || SlaveDutyId != null && SlaveDutyId.Equals(other.SlaveDutyId) )); }