/// <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(); } hashCode = hashCode * 59 + Severity.GetHashCode(); hashCode = hashCode * 59 + Passed.GetHashCode(); hashCode = hashCode * 59 + Override.GetHashCode(); if (ActualValue != null) { hashCode = hashCode * 59 + ActualValue.GetHashCode(); } if (ExpectedValue != null) { hashCode = hashCode * 59 + ExpectedValue.GetHashCode(); } hashCode = hashCode * 59 + Comparator.GetHashCode(); if (Kpi != null) { hashCode = hashCode * 59 + Kpi.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { return(Selector.GetHashCode() + ExpectedValue.GetHashCode()); }