public void Downgrade(string to) { UpgradesTo = to; if (Downgraded != null) { Downgraded.Invoke(this); } }
/// <summary> /// Returns true if Model3dsData instances are equal /// </summary> /// <param name="other">Instance of Model3dsData to be compared</param> /// <returns>Boolean</returns> public bool Equals(ThreeDSEnrollment other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Downgraded == other.Downgraded || Downgraded != null && Downgraded.Equals(other.Downgraded) ) && ( Enrolled == other.Enrolled || Enrolled != null && Enrolled.Equals(other.Enrolled) ) && ( SignatureValid == other.SignatureValid || SignatureValid != null && SignatureValid.Equals(other.SignatureValid) ) && ( AuthenticationResponse == other.AuthenticationResponse || AuthenticationResponse != null && AuthenticationResponse.Equals(other.AuthenticationResponse) ) && ( Cryptogram == other.Cryptogram || Cryptogram != null && Cryptogram.Equals(other.Cryptogram) ) && ( Xid == other.Xid || Xid != null && Xid.Equals(other.Xid) ) && ( Version == other.Version || Version != null && Version.Equals(other.Version) )); }
/// <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 (Downgraded != null) { hashCode = hashCode * 59 + Downgraded.GetHashCode(); } if (Enrolled != null) { hashCode = hashCode * 59 + Enrolled.GetHashCode(); } if (SignatureValid != null) { hashCode = hashCode * 59 + SignatureValid.GetHashCode(); } if (AuthenticationResponse != null) { hashCode = hashCode * 59 + AuthenticationResponse.GetHashCode(); } if (Cryptogram != null) { hashCode = hashCode * 59 + Cryptogram.GetHashCode(); } if (Xid != null) { hashCode = hashCode * 59 + Xid.GetHashCode(); } if (Version != null) { hashCode = hashCode * 59 + Version.GetHashCode(); } return(hashCode); } }