public bool Equals(ContactInfo other)
        {
            if (other == null)
            {
                return(false);
            }

            return((Email == other.Email ||
                    Email != null &&
                    Email.Equals(other.Email)) &&
                   (PhoneNumber == other.PhoneNumber ||
                    PhoneNumber != null &&
                    PhoneNumber.Equals(other.PhoneNumber)) &&
                   (FaxNumber == other.FaxNumber ||
                    FaxNumber != null &&
                    FaxNumber.Equals(other.FaxNumber)) &&
                   (Address == other.Address ||
                    Address != null &&
                    Address.Equals(other.Address)));
        }
Exemple #2
0
        /// <summary>
        /// Returns true if ContactDetails instances are equal
        /// </summary>
        /// <param name="other">Instance of ContactDetails to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ContactDetails other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FaxNumber == other.FaxNumber ||
                     FaxNumber != null &&
                     FaxNumber.Equals(other.FaxNumber)
                     ) &&
                 (
                     PhoneNumber == other.PhoneNumber ||
                     PhoneNumber != null &&
                     PhoneNumber.Equals(other.PhoneNumber)
                 ));
        }
Exemple #3
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)
                 ));
        }