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