Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Street1 != null ? Street1.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Street2 != null ? Street2.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (State != null ? State.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Zip != null ? Zip.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Street != null ? Street.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Street2 != null ? Street2.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PostalCode != null ? PostalCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CareOf != null ? CareOf.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemplo n.º 3
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 (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (EmailAddress != null)
         {
             hashCode = hashCode * 59 + EmailAddress.GetHashCode();
         }
         if (FaxNumber != null)
         {
             hashCode = hashCode * 59 + FaxNumber.GetHashCode();
         }
         if (PhoneNumber != null)
         {
             hashCode = hashCode * 59 + PhoneNumber.GetHashCode();
         }
         if (PostCode != null)
         {
             hashCode = hashCode * 59 + PostCode.GetHashCode();
         }
         if (StateOrProvince != null)
         {
             hashCode = hashCode * 59 + StateOrProvince.GetHashCode();
         }
         if (Street1 != null)
         {
             hashCode = hashCode * 59 + Street1.GetHashCode();
         }
         if (Street2 != null)
         {
             hashCode = hashCode * 59 + Street2.GetHashCode();
         }
         if (MediumCharacteristicType != null)
         {
             hashCode = hashCode * 59 + MediumCharacteristicType.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Get a hash value for the <b>Address</b> object.
 /// </summary>
 /// <returns>
 /// An integer hash value for this <b>Address</b> object.
 /// </returns>
 public override int GetHashCode()
 {
     return((Street1 == null ? 0 : Street1.GetHashCode()) ^
            (Street2 == null ? 0 : Street2.GetHashCode()) ^
            (ZipCode == null ? 0 : ZipCode.GetHashCode()));
 }