/// <summary> /// Returns true if CommonPerson instances are equal /// </summary> /// <param name="other">Instance of CommonPerson to be compared</param> /// <returns>Boolean</returns> public bool Equals(CommonPerson other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( LastUpdateTime == other.LastUpdateTime || LastUpdateTime != null && LastUpdateTime.Equals(other.LastUpdateTime) ) && ( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) ) && ( MiddleNames == other.MiddleNames || MiddleNames != null && MiddleNames.SequenceEqual(other.MiddleNames) ) && ( Prefix == other.Prefix || Prefix != null && Prefix.Equals(other.Prefix) ) && ( Suffix == other.Suffix || Suffix != null && Suffix.Equals(other.Suffix) ) && ( OccupationCode == other.OccupationCode || OccupationCode != null && OccupationCode.Equals(other.OccupationCode) )); }
private bool Equals(Article other) { bool authorsEquals = Authors.Count == other.Authors.Count; if (!authorsEquals) { return(false); } for (int i = 0; i < Authors.Count; i++) { authorsEquals = Authors[i].Equals(other.Authors[i]); if (!authorsEquals) { return(false); } } return(string.Equals(Id, other.Id) && string.Equals(Source, other.Source) && string.Equals(Subject, other.Subject) && string.Equals(Title, other.Title) && PublishDate.Equals(other.PublishDate) && LastUpdateTime.Equals(other.LastUpdateTime) && Content.Equals(other.Content) && authorsEquals && string.Equals(Summary, other.Summary)); }
/// <summary> /// Returns true if CommonOrganisation instances are equal /// </summary> /// <param name="other">Instance of CommonOrganisation to be compared</param> /// <returns>Boolean</returns> public bool Equals(CommonOrganisation other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( LastUpdateTime == other.LastUpdateTime || LastUpdateTime != null && LastUpdateTime.Equals(other.LastUpdateTime) ) && ( AgentFirstName == other.AgentFirstName || AgentFirstName != null && AgentFirstName.Equals(other.AgentFirstName) ) && ( AgentLastName == other.AgentLastName || AgentLastName != null && AgentLastName.Equals(other.AgentLastName) ) && ( AgentRole == other.AgentRole || AgentRole != null && AgentRole.Equals(other.AgentRole) ) && ( BusinessName == other.BusinessName || BusinessName != null && BusinessName.Equals(other.BusinessName) ) && ( LegalName == other.LegalName || LegalName != null && LegalName.Equals(other.LegalName) ) && ( ShortName == other.ShortName || ShortName != null && ShortName.Equals(other.ShortName) ) && ( Abn == other.Abn || Abn != null && Abn.Equals(other.Abn) ) && ( Acn == other.Acn || Acn != null && Acn.Equals(other.Acn) ) && ( IsACNCRegistered == other.IsACNCRegistered || IsACNCRegistered != null && IsACNCRegistered.Equals(other.IsACNCRegistered) ) && ( IndustryCode == other.IndustryCode || IndustryCode != null && IndustryCode.Equals(other.IndustryCode) ) && ( OrganisationType == other.OrganisationType || OrganisationType != null && OrganisationType.Equals(other.OrganisationType) ) && ( RegisteredCountry == other.RegisteredCountry || RegisteredCountry != null && RegisteredCountry.Equals(other.RegisteredCountry) ) && ( EstablishmentDate == other.EstablishmentDate || EstablishmentDate != null && EstablishmentDate.Equals(other.EstablishmentDate) )); }