/// <summary> /// Returns true if HoursAssignmentRequirement instances are equal /// </summary> /// <param name="other">Instance of HoursAssignmentRequirement to be compared</param> /// <returns>Boolean</returns> public bool Equals(HoursAssignmentRequirement other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Grade == other.Grade || Grade != null && Grade.Equals(other.Grade) ) && ( GradeType == other.GradeType || GradeType != null && GradeType.Equals(other.GradeType) ) && ( GradeTypeCategory == other.GradeTypeCategory || GradeTypeCategory != null && GradeTypeCategory.Equals(other.GradeTypeCategory) )); }
/// <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 (Grade != null) { hashCode = hashCode * 59 + Grade.GetHashCode(); } if (GradeType != null) { hashCode = hashCode * 59 + GradeType.GetHashCode(); } if (GradeTypeCategory != null) { hashCode = hashCode * 59 + GradeTypeCategory.GetHashCode(); } if (Gender != null) { hashCode = hashCode * 59 + Gender.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if VacancyPersonRequirements instances are equal /// </summary> /// <param name="other">Instance of VacancyPersonRequirements to be compared</param> /// <returns>Boolean</returns> public bool Equals(VacancyPersonRequirements other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Grade == other.Grade || Grade != null && Grade.Equals(other.Grade) ) && ( GradeType == other.GradeType || GradeType != null && GradeType.Equals(other.GradeType) ) && ( GradeTypeCategory == other.GradeTypeCategory || GradeTypeCategory != null && GradeTypeCategory.Equals(other.GradeTypeCategory) ) && ( Gender == other.Gender || Gender != null && Gender.Equals(other.Gender) )); }
/// <summary> /// Returns true if HoursAssignmentPerson instances are equal /// </summary> /// <param name="other">Instance of HoursAssignmentPerson to be compared</param> /// <returns>Boolean</returns> public bool Equals(HoursAssignmentPerson other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( StaffNumber == other.StaffNumber || StaffNumber != null && StaffNumber.Equals(other.StaffNumber) ) && ( Forenames == other.Forenames || Forenames != null && Forenames.Equals(other.Forenames) ) && ( Surname == other.Surname || Surname != null && Surname.Equals(other.Surname) ) && ( MobileNumber == other.MobileNumber || MobileNumber != null && MobileNumber.Equals(other.MobileNumber) ) && ( Grade == other.Grade || Grade != null && Grade.Equals(other.Grade) ) && ( GradeType == other.GradeType || GradeType != null && GradeType.Equals(other.GradeType) ) && ( GradeTypeCategory == other.GradeTypeCategory || GradeTypeCategory != null && GradeTypeCategory.Equals(other.GradeTypeCategory) ) && ( WTE == other.WTE || WTE.Equals(other.WTE) )); }
/// <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 (StaffNumber != null) { hashCode = hashCode * 59 + StaffNumber.GetHashCode(); } if (Forenames != null) { hashCode = hashCode * 59 + Forenames.GetHashCode(); } if (Surname != null) { hashCode = hashCode * 59 + Surname.GetHashCode(); } if (MobileNumber != null) { hashCode = hashCode * 59 + MobileNumber.GetHashCode(); } if (Grade != null) { hashCode = hashCode * 59 + Grade.GetHashCode(); } if (GradeType != null) { hashCode = hashCode * 59 + GradeType.GetHashCode(); } if (GradeTypeCategory != null) { hashCode = hashCode * 59 + GradeTypeCategory.GetHashCode(); } hashCode = hashCode * 59 + WTE.GetHashCode(); return(hashCode); } }