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

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     OwnerEquipmentCodePrefix == other.OwnerEquipmentCodePrefix ||
                     OwnerEquipmentCodePrefix != null &&
                     OwnerEquipmentCodePrefix.Equals(other.OwnerEquipmentCodePrefix)
                 ) &&
                 (
                     OrganizationName == other.OrganizationName ||
                     OrganizationName != null &&
                     OrganizationName.Equals(other.OrganizationName)
                 ) &&
                 (
                     MeetsResidency == other.MeetsResidency ||
                     MeetsResidency.Equals(other.MeetsResidency)
                 ) &&
                 (
                     LocalArea == other.LocalArea ||
                     LocalArea != null &&
                     LocalArea.Equals(other.LocalArea)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     DoingBusinessAs == other.DoingBusinessAs ||
                     DoingBusinessAs != null &&
                     DoingBusinessAs.Equals(other.DoingBusinessAs)
                 ) &&
                 (
                     RegisteredCompanyNumber == other.RegisteredCompanyNumber ||
                     RegisteredCompanyNumber != null &&
                     RegisteredCompanyNumber.Equals(other.RegisteredCompanyNumber)
                 ) &&
                 (
                     PrimaryContact == other.PrimaryContact ||
                     PrimaryContact != null &&
                     PrimaryContact.Equals(other.PrimaryContact)
                 ) &&
                 (
                     IsMaintenanceContractor == other.IsMaintenanceContractor ||
                     IsMaintenanceContractor != null &&
                     IsMaintenanceContractor.Equals(other.IsMaintenanceContractor)
                 ) &&
                 (
                     WorkSafeBCPolicyNumber == other.WorkSafeBCPolicyNumber ||
                     WorkSafeBCPolicyNumber != null &&
                     WorkSafeBCPolicyNumber.Equals(other.WorkSafeBCPolicyNumber)
                 ) &&
                 (
                     WorkSafeBCExpiryDate == other.WorkSafeBCExpiryDate ||
                     WorkSafeBCExpiryDate != null &&
                     WorkSafeBCExpiryDate.Equals(other.WorkSafeBCExpiryDate)
                 ) &&
                 (
                     CGLEndDate == other.CGLEndDate ||
                     CGLEndDate != null &&
                     CGLEndDate.Equals(other.CGLEndDate)
                 ) &&
                 (
                     ArchiveCode == other.ArchiveCode ||
                     ArchiveCode != null &&
                     ArchiveCode.Equals(other.ArchiveCode)
                 ) &&
                 (
                     ArchiveReason == other.ArchiveReason ||
                     ArchiveReason != null &&
                     ArchiveReason.Equals(other.ArchiveReason)
                 ) &&
                 (
                     ArchiveDate == other.ArchiveDate ||
                     ArchiveDate != null &&
                     ArchiveDate.Equals(other.ArchiveDate)
                 ) &&
                 (
                     Contacts == other.Contacts ||
                     Contacts != null &&
                     Contacts.SequenceEqual(other.Contacts)
                 ) &&
                 (
                     Notes == other.Notes ||
                     Notes != null &&
                     Notes.SequenceEqual(other.Notes)
                 ) &&
                 (
                     Attachments == other.Attachments ||
                     Attachments != null &&
                     Attachments.SequenceEqual(other.Attachments)
                 ) &&
                 (
                     History == other.History ||
                     History != null &&
                     History.SequenceEqual(other.History)
                 ) &&
                 (
                     EquipmentList == other.EquipmentList ||
                     EquipmentList != null &&
                     EquipmentList.SequenceEqual(other.EquipmentList)
                 ));
        }