protected bool Equals(UserDescription other) { return string.Equals(EmailAddress, other.EmailAddress) && string.Equals(Description, other.Description) && Equals(Data, other.Data); }
private void ProcessUserDescription(EventUserDescription description) { var ev = _eventRepository.GetByReferenceId(description.ProjectId, description.ReferenceId).Documents.FirstOrDefault(); if (ev == null) throw new DocumentNotFoundException(description.ReferenceId); var ud = new UserDescription { EmailAddress = description.EmailAddress, Description = description.Description }; if (description.Data.Count > 0) ev.Data.AddRange(description.Data); ev.SetUserDescription(ud); _eventRepository.Save(ev); }
/// <summary> /// Sets the user's description of the event. /// </summary> /// <param name="ev">The event.</param> /// <param name="description">The user's description.</param> public static void SetUserDescription(this Event ev, UserDescription description) { if (description == null || (String.IsNullOrWhiteSpace(description.EmailAddress) && String.IsNullOrWhiteSpace(description.Description))) return; ev.Data[Event.KnownDataKeys.UserDescription] = description; }
protected bool Equals(UserDescription other) { return(String.Equals(EmailAddress, other.EmailAddress) && String.Equals(Description, other.Description) && Equals(Data, other.Data)); }