Exemplo n.º 1
0
 public override bool IsEqualTo(PostalAddress address)
 {
     return base.IsEqualTo(address) &&
         PostalCode.IsEquivalentTo(((ForeignPostalAddress)address).PostalCode) &&
         Country == ((ForeignPostalAddress)address).Country;
 }
Exemplo n.º 2
0
 public override bool IsEqualTo(PostalAddress address)
 {
     return base.IsEqualTo(address) &&
         State == ((USPostalAddress)address).State &&
         ZipCode == ((USPostalAddress)address).ZipCode;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Determines whether the current postal address instance is equal to the other specified postal address.
        /// </summary>
        /// <param name="address">The postal address instance to be compared with.</param>
        /// <returns>True, if the current postal address is equal to the other specified postal address instance;
        /// otherwise, false.</returns>
        public virtual bool IsEqualTo(PostalAddress address)
        {
            if(address == null)
                return false;
            if(address.GetType() != GetType())
                return false;

            return AddressLine1.IsEquivalentTo(address.AddressLine1) &&
                AddressLine2.IsEquivalentTo(address.AddressLine2) &&
                City.IsEquivalentTo(address.City);
        }