Пример #1
0
        bool DeepEquals(object obj)
        {
            var other = obj as Customer;

            if (other == null)
            {
                return(false);
            }
            if (!base.Equals(obj))
            {
                return(false);
            }

            if (!Name.IsEqual(other.Name))
            {
                return(false);
            }
            if (!Address.IsEqual(other.Address))
            {
                return(false);
            }
            if (!PostalCode.IsEqual(other.PostalCode))
            {
                return(false);
            }
            if (!City.IsEqual(other.City))
            {
                return(false);
            }
            if (!TelephoneNumber.IsEqual(other.TelephoneNumber))
            {
                return(false);
            }
            if (!EmailAddress.IsEqual(other.EmailAddress))
            {
                return(false);
            }

            return(true);
        }