/// <summary> /// Specifies whether the credential is the same with a specific object. /// </summary> /// /// <returns> /// true if the credential is the same with a specific object; otherwise, false. /// </returns> /// <param name="other">The other object to compare.</param> public override bool Equals(object other) { MpnsCredential otherCredential = other as MpnsCredential; if (otherCredential == null) { return(false); } return(otherCredential.CertificateKey == this.CertificateKey && otherCredential.MpnsCertificate == this.MpnsCertificate); }
/// <summary> /// Initializes a new instance of the <see cref="T:Microsoft.Azure.NotificationHubs.MpnsCredential"/> class. /// </summary> /// <param name="mpnsCertificate">The MPNS certificate.</param><param name="certificateKey">The certificate key.</param> public MpnsCredential(X509Certificate mpnsCertificate, string certificateKey) : this(MpnsCredential.ExportCertificateBytes(mpnsCertificate, certificateKey), certificateKey) { }