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