public override int GetHashCode()
        {
            int hash = 1;

            if (StreetName.Length != 0)
            {
                hash ^= StreetName.GetHashCode();
            }
            if (BuildingNumber != 0)
            {
                hash ^= BuildingNumber.GetHashCode();
            }
            if (AddressLine.Length != 0)
            {
                hash ^= AddressLine.GetHashCode();
            }
            if (PostCode.Length != 0)
            {
                hash ^= PostCode.GetHashCode();
            }
            if (TownName.Length != 0)
            {
                hash ^= TownName.GetHashCode();
            }
            if (Country.Length != 0)
            {
                hash ^= Country.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 /// <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 (Address != null)
         {
             hashCode = hashCode * 59 + Address.GetHashCode();
         }
         if (AdditionalInfo != null)
         {
             hashCode = hashCode * 59 + AdditionalInfo.GetHashCode();
         }
         if (DistrictName != null)
         {
             hashCode = hashCode * 59 + DistrictName.GetHashCode();
         }
         if (TownName != null)
         {
             hashCode = hashCode * 59 + TownName.GetHashCode();
         }
         if (IbgeCode != null)
         {
             hashCode = hashCode * 59 + IbgeCode.GetHashCode();
         }
         if (CountrySubDivision != null)
         {
             hashCode = hashCode * 59 + CountrySubDivision.GetHashCode();
         }
         if (PostCode != null)
         {
             hashCode = hashCode * 59 + PostCode.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (CountryCode != null)
         {
             hashCode = hashCode * 59 + CountryCode.GetHashCode();
         }
         if (GeographicCoordinates != null)
         {
             hashCode = hashCode * 59 + GeographicCoordinates.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if SharedAutomatedTellerMachinesPostalAddress instances are equal
        /// </summary>
        /// <param name="other">Instance of SharedAutomatedTellerMachinesPostalAddress to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SharedAutomatedTellerMachinesPostalAddress other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Address == other.Address ||
                     Address != null &&
                     Address.Equals(other.Address)
                     ) &&
                 (
                     AdditionalInfo == other.AdditionalInfo ||
                     AdditionalInfo != null &&
                     AdditionalInfo.Equals(other.AdditionalInfo)
                 ) &&
                 (
                     DistrictName == other.DistrictName ||
                     DistrictName != null &&
                     DistrictName.Equals(other.DistrictName)
                 ) &&
                 (
                     TownName == other.TownName ||
                     TownName != null &&
                     TownName.Equals(other.TownName)
                 ) &&
                 (
                     IbgeCode == other.IbgeCode ||
                     IbgeCode != null &&
                     IbgeCode.Equals(other.IbgeCode)
                 ) &&
                 (
                     CountrySubDivision == other.CountrySubDivision ||
                     CountrySubDivision != null &&
                     CountrySubDivision.Equals(other.CountrySubDivision)
                 ) &&
                 (
                     PostCode == other.PostCode ||
                     PostCode != null &&
                     PostCode.Equals(other.PostCode)
                 ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ) &&
                 (
                     CountryCode == other.CountryCode ||
                     CountryCode != null &&
                     CountryCode.Equals(other.CountryCode)
                 ) &&
                 (
                     GeographicCoordinates == other.GeographicCoordinates ||
                     GeographicCoordinates != null &&
                     GeographicCoordinates.Equals(other.GeographicCoordinates)
                 ));
        }
Ejemplo n.º 4
0
 public void EntertownName(string town)
 {
     TownName.Clear();
     TownName.SendKeys(town);
 }
Ejemplo n.º 5
0
 public override int GetHashCode()
 {
     return(TownName != null ? TownName.GetHashCode() : 0);
 }