/// <summary> /// Returns true if Wearable instances are equal /// </summary> /// <param name="other">Instance of Wearable to be compared</param> /// <returns>Boolean</returns> public bool Equals(Wearable other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( PersonId == other.PersonId || PersonId != null && PersonId.Equals(other.PersonId) ) && ( ThingId == other.ThingId || ThingId != null && ThingId.Equals(other.ThingId) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) )); }
protected override IBirthdayEvent OnExecute() { this.Trace.TraceDebug((long)this.GetHashCode(), "Updating birthday for contact"); this.Result = new BirthdayEventCommandResult(); IBirthdayEventInternal birthdayEventInternal = this.BirthdayEvent as IBirthdayEventInternal; if (birthdayEventInternal == null) { throw new ArgumentException("Was not expecting a null internal birthday event"); } IBirthdayContactInternal birthdayContactInternal = this.BirthdayContact as IBirthdayContactInternal; if (birthdayContactInternal == null) { throw new ArgumentException("Was not expecting a null internal birthday contact"); } if (UpdateBirthdayEventForContact.ShouldEventBeUpdated(birthdayEventInternal, birthdayContactInternal)) { this.Scope.BirthdayEventDataProvider.Delete(birthdayEventInternal.StoreId, DeleteItemFlags.HardDelete); this.Result.DeletedEvents.Add(this.BirthdayEvent); this.Result.MergeWith(this.Scope.CreateBirthdayEventForContact(this.BirthdayContact)); } PersonId personId = birthdayEventInternal.PersonId; if (personId != null && !personId.Equals(birthdayContactInternal.PersonId)) { IEnumerable <IBirthdayContact> linkedContacts = this.Scope.ParentScope.ParentScope.Contacts.GetLinkedContacts(personId); this.Result.MergeWith(this.Scope.UpdateBirthdaysForLinkedContacts(linkedContacts)); } return(this.Result.CreatedEvents.FirstOrDefault <IBirthdayEvent>()); }
/// <summary> /// Returns true if PersonWithWearable instances are equal /// </summary> /// <param name="other">Instance of PersonWithWearable to be compared</param> /// <returns>Boolean</returns> public bool Equals(PersonWithWearable other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( PersonId == other.PersonId || PersonId != null && PersonId.Equals(other.PersonId) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Status == other.Status || Status != null && Status.Equals(other.Status) ) && ( Role == other.Role || Role != null && Role.Equals(other.Role) ) && ( RoleDescription == other.RoleDescription || RoleDescription != null && RoleDescription.Equals(other.RoleDescription) ) && ( Lat == other.Lat || Lat != null && Lat.Equals(other.Lat) ) && ( Lon == other.Lon || Lon != null && Lon.Equals(other.Lon) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) )); }
/// <summary> /// Returns true if ProposalDetails instances are equal /// </summary> /// <param name="other">Instance of ProposalDetails to be compared</param> /// <returns>Boolean</returns> public bool Equals(ProposalDetails other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( PersonId == other.PersonId || PersonId != null && PersonId.Equals(other.PersonId) ) && ( EngagementRoute == other.EngagementRoute || EngagementRoute.Equals(other.EngagementRoute) ) && ( AgencyId == other.AgencyId || AgencyId != null && AgencyId.Equals(other.AgencyId) ) && ( Cost == other.Cost || Cost.Equals(other.Cost) ) && ( CancellationCosts == other.CancellationCosts || CancellationCosts != null && other.CancellationCosts != null && CancellationCosts.SequenceEqual(other.CancellationCosts) )); }
/// <summary> /// Returns true if ContactLogEvent instances are equal /// </summary> /// <param name="other">Instance of ContactLogEvent to be compared</param> /// <returns>Boolean</returns> public bool Equals(ContactLogEvent other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( PersonId == other.PersonId || PersonId != null && PersonId.Equals(other.PersonId) ) && ( ContactLogInformation == other.ContactLogInformation || ContactLogInformation != null && other.ContactLogInformation != null && ContactLogInformation.SequenceEqual(other.ContactLogInformation) )); }
protected bool Equals(Saying other) { return(PersonId.Equals(other.PersonId)); }