private void TryRaiseListMemberRemovedEvent(JObject listMemberAddedEvent) { var list = GetList(listMemberAddedEvent); var source = GetSourceUser(listMemberAddedEvent); var target = GetTargetUser(listMemberAddedEvent); if (source.Equals(_loggedUser)) { var listEventArgs = new ListUserUpdatedEventArgs(list, target); this.Raise(LoggedUserRemovedMemberFromList, listEventArgs); } else { var listEventArgs = new ListUserUpdatedEventArgs(list, source); this.Raise(LoggedUserRemovedFromListBy, listEventArgs); } }
private void TryRaiseListMemberUnsubscribedEvent(JObject listMemberAddedEvent) { var list = GetList(listMemberAddedEvent); var source = GetSourceUser(listMemberAddedEvent); var target = GetTargetUser(listMemberAddedEvent); if (source.Equals(_loggedUser)) { var listEventArgs = new ListUserUpdatedEventArgs(list, target); this.Raise(LoggedUserUnsubscribedToListCreatedBy, listEventArgs); } else { var listEventArgs = new ListUserUpdatedEventArgs(list, source); this.Raise(UserUnsubscribedToListCreatedByMe, listEventArgs); } }
private void TryRaiseListMemberAddedEvent(JObject listMemberAddedEvent) { var list = GetList(listMemberAddedEvent); var source = GetSourceUser(listMemberAddedEvent); var target = GetTargetUser(listMemberAddedEvent); if (source.Equals(_authenticatedUser)) { var listEventArgs = new ListUserUpdatedEventArgs(list, target); this.Raise(AuthenticatedUserAddedMemberToList, listEventArgs); } else { var listEventArgs = new ListUserUpdatedEventArgs(list, source); this.Raise(AuthenticatedUserAddedToListBy, listEventArgs); } }