Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if CommonEmailAddress instances are equal
        /// </summary>
        /// <param name="other">Instance of CommonEmailAddress to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CommonEmailAddress other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     IsPreferred == other.IsPreferred ||
                     IsPreferred != null &&
                     IsPreferred.Equals(other.IsPreferred)
                     ) &&
                 (
                     Purpose == other.Purpose ||
                     Purpose != null &&
                     Purpose.Equals(other.Purpose)
                 ) &&
                 (
                     Address == other.Address ||
                     Address != null &&
                     Address.Equals(other.Address)
                 ));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true if CommonPhoneNumber instances are equal
        /// </summary>
        /// <param name="other">Instance of CommonPhoneNumber to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CommonPhoneNumber other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     IsPreferred == other.IsPreferred ||
                     IsPreferred != null &&
                     IsPreferred.Equals(other.IsPreferred)
                     ) &&
                 (
                     Purpose == other.Purpose ||
                     Purpose != null &&
                     Purpose.Equals(other.Purpose)
                 ) &&
                 (
                     CountryCode == other.CountryCode ||
                     CountryCode != null &&
                     CountryCode.Equals(other.CountryCode)
                 ) &&
                 (
                     AreaCode == other.AreaCode ||
                     AreaCode != null &&
                     AreaCode.Equals(other.AreaCode)
                 ) &&
                 (
                     Number == other.Number ||
                     Number != null &&
                     Number.Equals(other.Number)
                 ) &&
                 (
                     Extension == other.Extension ||
                     Extension != null &&
                     Extension.Equals(other.Extension)
                 ) &&
                 (
                     FullNumber == other.FullNumber ||
                     FullNumber != null &&
                     FullNumber.Equals(other.FullNumber)
                 ));
        }