/// <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 (OutageTime != null) { hashCode = hashCode * 59 + OutageTime.GetHashCode(); } if (Duration != null) { hashCode = hashCode * 59 + Duration.GetHashCode(); } if (IsPartial != null) { hashCode = hashCode * 59 + IsPartial.GetHashCode(); } if (Explanation != null) { hashCode = hashCode * 59 + Explanation.GetHashCode(); } return(hashCode); } }
protected override int GetDetailedNodeKindHash() { var v = (int)NodeKind + (int)ComposeKind; unchecked { v += Name.GetHashCode() + IsPartial.GetHashCode(); } return(v); }