/// <summary> /// Returns true if WorkerPerformanceEvent instances are equal /// </summary> /// <param name="other">Instance of WorkerPerformanceEvent to be compared</param> /// <returns>Boolean</returns> public bool Equals(WorkerPerformanceEvent other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Worker == other.Worker || Worker != null && Worker.Equals(other.Worker) ) && ( DutyDetails == other.DutyDetails || DutyDetails != null && DutyDetails.Equals(other.DutyDetails) ) && ( Evaluation == other.Evaluation || Evaluation != null && Evaluation.Equals(other.Evaluation) )); }
/// <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 (Worker != null) { hashCode = hashCode * 59 + Worker.GetHashCode(); } if (DutyDetails != null) { hashCode = hashCode * 59 + DutyDetails.GetHashCode(); } if (Evaluation != null) { hashCode = hashCode * 59 + Evaluation.GetHashCode(); } return(hashCode); } }