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

            return
                ((
                     Identification == other.Identification ||
                     Identification != null &&
                     Identification.Equals(other.Identification)
                     ) &&
                 (
                     PersonalInfo == other.PersonalInfo ||
                     PersonalInfo != null &&
                     PersonalInfo.Equals(other.PersonalInfo)
                 ) &&
                 (
                     EmploymentDetails == other.EmploymentDetails ||
                     EmploymentDetails != null &&
                     EmploymentDetails.Equals(other.EmploymentDetails)
                 ) &&
                 (
                     WorkLocations == other.WorkLocations ||
                     WorkLocations != null &&
                     WorkLocations.Equals(other.WorkLocations)
                 ) &&
                 (
                     Postings == other.Postings ||
                     Postings != null &&
                     other.Postings != null &&
                     Postings.SequenceEqual(other.Postings)
                 ) &&
                 (
                     Contracts == other.Contracts ||
                     Contracts != null &&
                     other.Contracts != null &&
                     Contracts.SequenceEqual(other.Contracts)
                 ) &&
                 (
                     Skills == other.Skills ||
                     Skills != null &&
                     other.Skills != null &&
                     Skills.SequenceEqual(other.Skills)
                 ) &&
                 (
                     Specialties == other.Specialties ||
                     Specialties != null &&
                     other.Specialties != null &&
                     Specialties.SequenceEqual(other.Specialties)
                 ) &&
                 (
                     Attributes == other.Attributes ||
                     Attributes != null &&
                     other.Attributes != null &&
                     Attributes.SequenceEqual(other.Attributes)
                 ) &&
                 (
                     Visas == other.Visas ||
                     Visas != null &&
                     other.Visas != null &&
                     Visas.SequenceEqual(other.Visas)
                 ) &&
                 (
                     WorkingRestrictions == other.WorkingRestrictions ||
                     WorkingRestrictions != null &&
                     other.WorkingRestrictions != null &&
                     WorkingRestrictions.SequenceEqual(other.WorkingRestrictions)
                 ) &&
                 (
                     Availabilities == other.Availabilities ||
                     Availabilities != null &&
                     Availabilities.Equals(other.Availabilities)
                 ) &&
                 (
                     PersonalPattern == other.PersonalPattern ||
                     PersonalPattern != null &&
                     PersonalPattern.Equals(other.PersonalPattern)
                 ));
        }