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