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

            return
                ((
                     DiseaseName == other.DiseaseName ||
                     DiseaseName != null &&
                     DiseaseName.Equals(other.DiseaseName)
                     ) &&
                 (
                     CountryName == other.CountryName ||
                     CountryName != null &&
                     CountryName.Equals(other.CountryName)
                 ) &&
                 (
                     Population == other.Population ||
                     Population != null &&
                     Population.Equals(other.Population)
                 ) &&
                 (
                     PrevalanceFactor == other.PrevalanceFactor ||
                     PrevalanceFactor != null &&
                     PrevalanceFactor.Equals(other.PrevalanceFactor)
                 ));
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (obj is CountryCodeEntry entry)
            {
                return(Alpha2.Equals(entry.Alpha2) & Alpha3.Equals(entry.Alpha3) & CountryName.Equals(entry.CountryName)
                       & IsSEPAMember == entry.IsSEPAMember & IsUsingEuros == entry.IsUsingEuros);
            }

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

            return
                ((
                     AddressId == other.AddressId ||
                     AddressId != null &&
                     AddressId.Equals(other.AddressId)
                     ) &&
                 (
                     Nickname == other.Nickname ||
                     Nickname != null &&
                     Nickname.Equals(other.Nickname)
                 ) &&
                 (
                     IsPrimary == other.IsPrimary ||
                     IsPrimary != null &&
                     IsPrimary.Equals(other.IsPrimary)
                 ) &&
                 (
                     CountryName == other.CountryName ||
                     CountryName != null &&
                     CountryName.Equals(other.CountryName)
                 ) &&
                 (
                     CountryId == other.CountryId ||
                     CountryId != null &&
                     CountryId.Equals(other.CountryId)
                 ) &&
                 (
                     Zip == other.Zip ||
                     Zip != null &&
                     Zip.Equals(other.Zip)
                 ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     AdministrativeArea == other.AdministrativeArea ||
                     AdministrativeArea != null &&
                     AdministrativeArea.Equals(other.AdministrativeArea)
                 ) &&
                 (
                     DependentLocality == other.DependentLocality ||
                     DependentLocality != null &&
                     DependentLocality.Equals(other.DependentLocality)
                 ) &&
                 (
                     SortingCode == other.SortingCode ||
                     SortingCode != null &&
                     SortingCode.Equals(other.SortingCode)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     AddressLine1 == other.AddressLine1 ||
                     AddressLine1 != null &&
                     AddressLine1.Equals(other.AddressLine1)
                 ) &&
                 (
                     AddressLine2 == other.AddressLine2 ||
                     AddressLine2 != null &&
                     AddressLine2.Equals(other.AddressLine2)
                 ));
        }