예제 #1
0
 /// <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 (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Key != null)
         {
             hashCode = hashCode * 59 + Key.GetHashCode();
         }
         if (Cert != null)
         {
             hashCode = hashCode * 59 + Cert.GetHashCode();
         }
         if (AuthMode != null)
         {
             hashCode = hashCode * 59 + AuthMode.GetHashCode();
         }
         if (SCAL != null)
         {
             hashCode = hashCode * 59 + SCAL.GetHashCode();
         }
         if (PIN != null)
         {
             hashCode = hashCode * 59 + PIN.GetHashCode();
         }
         if (OTP != null)
         {
             hashCode = hashCode * 59 + OTP.GetHashCode();
         }
         if (Multisign != null)
         {
             hashCode = hashCode * 59 + Multisign.GetHashCode();
         }
         if (Lang != null)
         {
             hashCode = hashCode * 59 + Lang.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #2
0
 /// <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 (CredentialID != null)
         {
             hashCode = hashCode * 59 + CredentialID.GetHashCode();
         }
         if (NumSignatures != null)
         {
             hashCode = hashCode * 59 + NumSignatures.GetHashCode();
         }
         if (Hash != null)
         {
             hashCode = hashCode * 59 + Hash.GetHashCode();
         }
         if (PIN != null)
         {
             hashCode = hashCode * 59 + PIN.GetHashCode();
         }
         if (OTP != null)
         {
             hashCode = hashCode * 59 + OTP.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (ClientData != null)
         {
             hashCode = hashCode * 59 + ClientData.GetHashCode();
         }
         return(hashCode);
     }
 }