Exemplo n.º 1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (PeriodeGeldigheid != null)
         {
             hashCode = hashCode * 59 + PeriodeGeldigheid.GetHashCode();
         }
         if (VoorlettersAanschrijving != null)
         {
             hashCode = hashCode * 59 + VoorlettersAanschrijving.GetHashCode();
         }
         if (Voornamen != null)
         {
             hashCode = hashCode * 59 + Voornamen.GetHashCode();
         }
         if (VoorvoegselGeslachtsnaam != null)
         {
             hashCode = hashCode * 59 + VoorvoegselGeslachtsnaam.GetHashCode();
         }
         if (Geslachtsnaam != null)
         {
             hashCode = hashCode * 59 + Geslachtsnaam.GetHashCode();
         }
         if (Geslachtsaanduiding != null)
         {
             hashCode = hashCode * 59 + Geslachtsaanduiding.GetHashCode();
         }
         if (Aanschrijfwijze != null)
         {
             hashCode = hashCode * 59 + Aanschrijfwijze.GetHashCode();
         }
         if (Geboortedatum != null)
         {
             hashCode = hashCode * 59 + Geboortedatum.GetHashCode();
         }
         if (Verblijfsadres != null)
         {
             hashCode = hashCode * 59 + Verblijfsadres.GetHashCode();
         }
         if (Adresbuitenland != null)
         {
             hashCode = hashCode * 59 + Adresbuitenland.GetHashCode();
         }
         return(hashCode);
     }
 }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (PeriodeGeldigheid != null)
         {
             hashCode = hashCode * 59 + PeriodeGeldigheid.GetHashCode();
         }
         if (IdentificatieNummerAanduiding != null)
         {
             hashCode = hashCode * 59 + IdentificatieNummerAanduiding.GetHashCode();
         }
         if (Postcode != null)
         {
             hashCode = hashCode * 59 + Postcode.GetHashCode();
         }
         if (Huisnummer != null)
         {
             hashCode = hashCode * 59 + Huisnummer.GetHashCode();
         }
         if (Huisletter != null)
         {
             hashCode = hashCode * 59 + Huisletter.GetHashCode();
         }
         if (Huisnummertoevoeging != null)
         {
             hashCode = hashCode * 59 + Huisnummertoevoeging.GetHashCode();
         }
         if (Locatiebeschrijving != null)
         {
             hashCode = hashCode * 59 + Locatiebeschrijving.GetHashCode();
         }
         if (NaamOpenbareRuimte != null)
         {
             hashCode = hashCode * 59 + NaamOpenbareRuimte.GetHashCode();
         }
         if (Woonplaatsnaam != null)
         {
             hashCode = hashCode * 59 + Woonplaatsnaam.GetHashCode();
         }
         if (WoonplaatsIdentificatie != null)
         {
             hashCode = hashCode * 59 + WoonplaatsIdentificatie.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Returns true if Persoon instances are equal
        /// </summary>
        /// <param name="other">Instance of Persoon to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Persoon other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     PeriodeGeldigheid == other.PeriodeGeldigheid ||
                     PeriodeGeldigheid != null &&
                     PeriodeGeldigheid.Equals(other.PeriodeGeldigheid)
                     ) &&
                 (
                     VoorlettersAanschrijving == other.VoorlettersAanschrijving ||
                     VoorlettersAanschrijving != null &&
                     VoorlettersAanschrijving.Equals(other.VoorlettersAanschrijving)
                 ) &&
                 (
                     Voornamen == other.Voornamen ||
                     Voornamen != null &&
                     Voornamen.Equals(other.Voornamen)
                 ) &&
                 (
                     VoorvoegselGeslachtsnaam == other.VoorvoegselGeslachtsnaam ||
                     VoorvoegselGeslachtsnaam != null &&
                     VoorvoegselGeslachtsnaam.Equals(other.VoorvoegselGeslachtsnaam)
                 ) &&
                 (
                     Geslachtsnaam == other.Geslachtsnaam ||
                     Geslachtsnaam != null &&
                     Geslachtsnaam.Equals(other.Geslachtsnaam)
                 ) &&
                 (
                     Geslachtsaanduiding == other.Geslachtsaanduiding ||
                     Geslachtsaanduiding != null &&
                     Geslachtsaanduiding.Equals(other.Geslachtsaanduiding)
                 ) &&
                 (
                     Aanschrijfwijze == other.Aanschrijfwijze ||
                     Aanschrijfwijze != null &&
                     Aanschrijfwijze.Equals(other.Aanschrijfwijze)
                 ) &&
                 (
                     Geboortedatum == other.Geboortedatum ||
                     Geboortedatum != null &&
                     Geboortedatum.Equals(other.Geboortedatum)
                 ) &&
                 (
                     Verblijfsadres == other.Verblijfsadres ||
                     Verblijfsadres != null &&
                     Verblijfsadres.Equals(other.Verblijfsadres)
                 ) &&
                 (
                     Adresbuitenland == other.Adresbuitenland ||
                     Adresbuitenland != null &&
                     Adresbuitenland.Equals(other.Adresbuitenland)
                 ));
        }
        /// <summary>
        /// Returns true if Verblijfsadres instances are equal
        /// </summary>
        /// <param name="other">Instance of Verblijfsadres to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Verblijfsadres other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     PeriodeGeldigheid == other.PeriodeGeldigheid ||
                     PeriodeGeldigheid != null &&
                     PeriodeGeldigheid.Equals(other.PeriodeGeldigheid)
                     ) &&
                 (
                     IdentificatieNummerAanduiding == other.IdentificatieNummerAanduiding ||
                     IdentificatieNummerAanduiding != null &&
                     IdentificatieNummerAanduiding.Equals(other.IdentificatieNummerAanduiding)
                 ) &&
                 (
                     Postcode == other.Postcode ||
                     Postcode != null &&
                     Postcode.Equals(other.Postcode)
                 ) &&
                 (
                     Huisnummer == other.Huisnummer ||
                     Huisnummer != null &&
                     Huisnummer.Equals(other.Huisnummer)
                 ) &&
                 (
                     Huisletter == other.Huisletter ||
                     Huisletter != null &&
                     Huisletter.Equals(other.Huisletter)
                 ) &&
                 (
                     Huisnummertoevoeging == other.Huisnummertoevoeging ||
                     Huisnummertoevoeging != null &&
                     Huisnummertoevoeging.Equals(other.Huisnummertoevoeging)
                 ) &&
                 (
                     Locatiebeschrijving == other.Locatiebeschrijving ||
                     Locatiebeschrijving != null &&
                     Locatiebeschrijving.Equals(other.Locatiebeschrijving)
                 ) &&
                 (
                     NaamOpenbareRuimte == other.NaamOpenbareRuimte ||
                     NaamOpenbareRuimte != null &&
                     NaamOpenbareRuimte.Equals(other.NaamOpenbareRuimte)
                 ) &&
                 (
                     Woonplaatsnaam == other.Woonplaatsnaam ||
                     Woonplaatsnaam != null &&
                     Woonplaatsnaam.Equals(other.Woonplaatsnaam)
                 ) &&
                 (
                     WoonplaatsIdentificatie == other.WoonplaatsIdentificatie ||
                     WoonplaatsIdentificatie != null &&
                     WoonplaatsIdentificatie.Equals(other.WoonplaatsIdentificatie)
                 ));
        }