/// <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 (AgreementId != null) { hashCode = hashCode * 59 + AgreementId.GetHashCode(); } if (Demand != null) { hashCode = hashCode * 59 + Demand.GetHashCode(); } if (Offer != null) { hashCode = hashCode * 59 + Offer.GetHashCode(); } if (ValidTo != null) { hashCode = hashCode * 59 + ValidTo.GetHashCode(); } if (ApprovedDate != null) { hashCode = hashCode * 59 + ApprovedDate.GetHashCode(); } if (State != null) { hashCode = hashCode * 59 + State.GetHashCode(); } if (ProposedSignature != null) { hashCode = hashCode * 59 + ProposedSignature.GetHashCode(); } if (ApprovedSignature != null) { hashCode = hashCode * 59 + ApprovedSignature.GetHashCode(); } if (CommittedSignature != null) { hashCode = hashCode * 59 + CommittedSignature.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (ThumbPrint != null ? ThumbPrint.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Issuer != null ? Issuer.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Subject != null ? Subject.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ValidFrom.GetHashCode(); hashCode = (hashCode * 397) ^ ValidTo.GetHashCode(); hashCode = (hashCode * 397) ^ (KeyAlgoritm != null ? KeyAlgoritm.GetHashCode() : 0); hashCode = (hashCode * 397) ^ KeyLength; hashCode = (hashCode * 397) ^ (SerialNumber != null ? SerialNumber.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Version != null ? Version.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SubjectAlternativeName != null ? SubjectAlternativeName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CommonName != null ? CommonName.GetHashCode() : 0); return(hashCode); } }