/// <summary> /// Returns true if ItemHistoryDTO instances are equal /// </summary> /// <param name="input">Instance of ItemHistoryDTO to be compared</param> /// <returns>Boolean</returns> public bool Equals(ItemHistoryDTO input) { if (input == null) { return(false); } return (( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( Totalrecords == input.Totalrecords || (Totalrecords != null && Totalrecords.Equals(input.Totalrecords)) ) && ( Datapoints == input.Datapoints || (Datapoints != null && Datapoints.Equals(input.Datapoints)) ) && ( Data == input.Data || Data != null && Data.SequenceEqual(input.Data) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Totalrecords != null) { hashCode = hashCode * 59 + Totalrecords.GetHashCode(); } if (Datapoints != null) { hashCode = hashCode * 59 + Datapoints.GetHashCode(); } if (Data != null) { hashCode = hashCode * 59 + Data.GetHashCode(); } return(hashCode); } }