Пример #1
0
        /// <summary>
        /// Returns true if CommonPAFAddress instances are equal
        /// </summary>
        /// <param name="other">Instance of CommonPAFAddress to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CommonPAFAddress other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Dpid == other.Dpid ||
                     Dpid != null &&
                     Dpid.Equals(other.Dpid)
                     ) &&
                 (
                     ThoroughfareNumber1 == other.ThoroughfareNumber1 ||
                     ThoroughfareNumber1 != null &&
                     ThoroughfareNumber1.Equals(other.ThoroughfareNumber1)
                 ) &&
                 (
                     ThoroughfareNumber1Suffix == other.ThoroughfareNumber1Suffix ||
                     ThoroughfareNumber1Suffix != null &&
                     ThoroughfareNumber1Suffix.Equals(other.ThoroughfareNumber1Suffix)
                 ) &&
                 (
                     ThoroughfareNumber2 == other.ThoroughfareNumber2 ||
                     ThoroughfareNumber2 != null &&
                     ThoroughfareNumber2.Equals(other.ThoroughfareNumber2)
                 ) &&
                 (
                     ThoroughfareNumber2Suffix == other.ThoroughfareNumber2Suffix ||
                     ThoroughfareNumber2Suffix != null &&
                     ThoroughfareNumber2Suffix.Equals(other.ThoroughfareNumber2Suffix)
                 ) &&
                 (
                     FlatUnitNumber == other.FlatUnitNumber ||
                     FlatUnitNumber != null &&
                     FlatUnitNumber.Equals(other.FlatUnitNumber)
                 ) &&
                 (
                     FloorLevelNumber == other.FloorLevelNumber ||
                     FloorLevelNumber != null &&
                     FloorLevelNumber.Equals(other.FloorLevelNumber)
                 ) &&
                 (
                     LotNumber == other.LotNumber ||
                     LotNumber != null &&
                     LotNumber.Equals(other.LotNumber)
                 ) &&
                 (
                     BuildingName1 == other.BuildingName1 ||
                     BuildingName1 != null &&
                     BuildingName1.Equals(other.BuildingName1)
                 ) &&
                 (
                     BuildingName2 == other.BuildingName2 ||
                     BuildingName2 != null &&
                     BuildingName2.Equals(other.BuildingName2)
                 ) &&
                 (
                     StreetName == other.StreetName ||
                     StreetName != null &&
                     StreetName.Equals(other.StreetName)
                 ) &&
                 (
                     StreetType == other.StreetType ||
                     StreetType != null &&
                     StreetType.Equals(other.StreetType)
                 ) &&
                 (
                     StreetSuffix == other.StreetSuffix ||
                     StreetSuffix != null &&
                     StreetSuffix.Equals(other.StreetSuffix)
                 ) &&
                 (
                     PostalDeliveryType == other.PostalDeliveryType ||
                     PostalDeliveryType != null &&
                     PostalDeliveryType.Equals(other.PostalDeliveryType)
                 ) &&
                 (
                     PostalDeliveryNumber == other.PostalDeliveryNumber ||
                     PostalDeliveryNumber != null &&
                     PostalDeliveryNumber.Equals(other.PostalDeliveryNumber)
                 ) &&
                 (
                     PostalDeliveryNumberPrefix == other.PostalDeliveryNumberPrefix ||
                     PostalDeliveryNumberPrefix != null &&
                     PostalDeliveryNumberPrefix.Equals(other.PostalDeliveryNumberPrefix)
                 ) &&
                 (
                     PostalDeliveryNumberSuffix == other.PostalDeliveryNumberSuffix ||
                     PostalDeliveryNumberSuffix != null &&
                     PostalDeliveryNumberSuffix.Equals(other.PostalDeliveryNumberSuffix)
                 ) &&
                 (
                     LocalityName == other.LocalityName ||
                     LocalityName != null &&
                     LocalityName.Equals(other.LocalityName)
                 ) &&
                 (
                     Postcode == other.Postcode ||
                     Postcode != null &&
                     Postcode.Equals(other.Postcode)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ));
        }