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

            return
                ((
                     Identification == other.Identification ||
                     Identification != null &&
                     Identification.Equals(other.Identification)
                     ) &&
                 (
                     PostalAddresses == other.PostalAddresses ||
                     PostalAddresses != null &&
                     PostalAddresses.Equals(other.PostalAddresses)
                 ) &&
                 (
                     Availability == other.Availability ||
                     Availability != null &&
                     Availability.Equals(other.Availability)
                 ) &&
                 (
                     Phones == other.Phones ||
                     Phones != null &&
                     Phones.SequenceEqual(other.Phones)
                 ) &&
                 (
                     Services == other.Services ||
                     Services != null &&
                     Services.SequenceEqual(other.Services)
                 ));
        }
예제 #2
0
 public bool Equals(ContactInfo other)
 => Emails.SequenceEqual(other.Emails) && Phones.SequenceEqual(other.Phones) && Websites.SequenceEqual(other.Websites);