/// <summary> /// Returns true if ActivityZone instances are equal /// </summary> /// <param name="other">Instance of ActivityZone to be compared</param> /// <returns>Boolean</returns> public bool Equals(ActivityZone other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Score == other.Score || Score != null && Score.Equals(other.Score) ) && ( DistributionBuckets == other.DistributionBuckets || DistributionBuckets != null && DistributionBuckets.Equals(other.DistributionBuckets) ) && ( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( SensorBased == other.SensorBased || SensorBased != null && SensorBased.Equals(other.SensorBased) ) && ( Points == other.Points || Points != null && Points.Equals(other.Points) ) && ( CustomZones == other.CustomZones || CustomZones != null && CustomZones.Equals(other.CustomZones) ) && ( Max == other.Max || Max != null && Max.Equals(other.Max) )); }
/// <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 (CustomZones != null) { hashCode = hashCode * 59 + CustomZones.GetHashCode(); } if (Zones != null) { hashCode = hashCode * 59 + Zones.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if HeartRateZoneRanges instances are equal /// </summary> /// <param name="other">Instance of HeartRateZoneRanges to be compared</param> /// <returns>Boolean</returns> public bool Equals(HeartRateZoneRanges other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( CustomZones == other.CustomZones || CustomZones != null && CustomZones.Equals(other.CustomZones) ) && ( Zones == other.Zones || Zones != null && Zones.Equals(other.Zones) )); }
/// <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 (Score != null) { hashCode = hashCode * 59 + Score.GetHashCode(); } if (DistributionBuckets != null) { hashCode = hashCode * 59 + DistributionBuckets.GetHashCode(); } if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (SensorBased != null) { hashCode = hashCode * 59 + SensorBased.GetHashCode(); } if (Points != null) { hashCode = hashCode * 59 + Points.GetHashCode(); } if (CustomZones != null) { hashCode = hashCode * 59 + CustomZones.GetHashCode(); } if (Max != null) { hashCode = hashCode * 59 + Max.GetHashCode(); } return(hashCode); } }