예제 #1
0
 /// <summary>
 /// GetHashCode.
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     if (OID != 0 && CodeValue != null)
     {
         return(OID.GetHashCode() | CodeValue.GetHashCode());
     }
     if (OID != 0)
     {
         return(OID.GetHashCode());
     }
     return(SimpleType != null?SimpleType.GetHashCode() : base.GetHashCode());
 }
예제 #2
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>The hash code for the certificate template as an integer.</returns>
 public override Int32 GetHashCode()
 {
     unchecked { return((Name.GetHashCode() * 397) ^ OID.GetHashCode()); }
 }