示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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);
            }
        }