/// <summary> /// Returns true if TemperatureZoneStatus instances are equal /// </summary> /// <param name="other">Instance of TemperatureZoneStatus to be compared</param> /// <returns>Boolean</returns> public bool Equals(TemperatureZoneStatus 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) ) && ( TemperatureValue == other.TemperatureValue || TemperatureValue != null && TemperatureValue.Equals(other.TemperatureValue) ) && ( HumidityValue == other.HumidityValue || HumidityValue != null && HumidityValue.Equals(other.HumidityValue) ) && ( PressureValue == other.PressureValue || PressureValue != null && PressureValue.Equals(other.PressureValue) ) && ( Units == other.Units || Units != null && Units.Equals(other.Units) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) )); }
/// <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 (TemperatureValue != null) { hashCode = hashCode * 59 + TemperatureValue.GetHashCode(); } if (HumidityValue != null) { hashCode = hashCode * 59 + HumidityValue.GetHashCode(); } if (PressureValue != null) { hashCode = hashCode * 59 + PressureValue.GetHashCode(); } if (Units != null) { hashCode = hashCode * 59 + Units.GetHashCode(); } if (Timestamp != null) { hashCode = hashCode * 59 + Timestamp.GetHashCode(); } return(hashCode); } }