public override int GetHashCode() { unchecked { int hashCode = (ChangeDetails != null ? ChangeDetails.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (IssueDetails != null ? IssueDetails.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Generated.GetHashCode(); hashCode = (hashCode * 397) ^ (FromVersion != null ? FromVersion.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ToVersion != null ? ToVersion.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ReferenceBuildConfiguration != null ? ReferenceBuildConfiguration.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BuildConfiguration != null ? BuildConfiguration.GetHashCode() : 0); return(hashCode); } }
/// <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 (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (FromVersion != null) { hashCode = hashCode * 59 + FromVersion.GetHashCode(); } if (ToVersion != null) { hashCode = hashCode * 59 + ToVersion.GetHashCode(); } return(hashCode); } }