Beispiel #1
0
        public override bool Equals(object obj)
        {
            Address addr = obj as Address;

            return(addr != null &&
                   Street1.Equals(addr.Street1, StringComparison.OrdinalIgnoreCase) &&
                   Street2.Equals(addr.Street2, StringComparison.OrdinalIgnoreCase) &&
                   PostalCode.Equals(addr.PostalCode, StringComparison.OrdinalIgnoreCase) &&
                   RegionCode.Equals(addr.RegionCode, StringComparison.OrdinalIgnoreCase) &&
                   CountryCode.Equals(addr.CountryCode, StringComparison.OrdinalIgnoreCase));
        }
Beispiel #2
0
        /// <summary>
        /// Returns true if MediumCharacteristic instances are equal
        /// </summary>
        /// <param name="other">Instance of MediumCharacteristic to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MediumCharacteristic other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                     ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ) &&
                 (
                     EmailAddress == other.EmailAddress ||
                     EmailAddress != null &&
                     EmailAddress.Equals(other.EmailAddress)
                 ) &&
                 (
                     FaxNumber == other.FaxNumber ||
                     FaxNumber != null &&
                     FaxNumber.Equals(other.FaxNumber)
                 ) &&
                 (
                     PhoneNumber == other.PhoneNumber ||
                     PhoneNumber != null &&
                     PhoneNumber.Equals(other.PhoneNumber)
                 ) &&
                 (
                     PostCode == other.PostCode ||
                     PostCode != null &&
                     PostCode.Equals(other.PostCode)
                 ) &&
                 (
                     StateOrProvince == other.StateOrProvince ||
                     StateOrProvince != null &&
                     StateOrProvince.Equals(other.StateOrProvince)
                 ) &&
                 (
                     Street1 == other.Street1 ||
                     Street1 != null &&
                     Street1.Equals(other.Street1)
                 ) &&
                 (
                     Street2 == other.Street2 ||
                     Street2 != null &&
                     Street2.Equals(other.Street2)
                 ) &&
                 (
                     MediumCharacteristicType == other.MediumCharacteristicType ||
                     MediumCharacteristicType != null &&
                     MediumCharacteristicType.Equals(other.MediumCharacteristicType)
                 ));
        }