public PartialFindResult <UserMessageContract> GetMessages( int id, UserInboxType?inbox = null, bool unread = false, int start = 0, int maxResults = 10, bool getTotalCount = false) { if (id != permissionContext.LoggedUserId) { throw new HttpForbiddenException(); } return(messageQueries.GetList(permissionContext.LoggedUserId, new PagingProperties(start, maxResults, getTotalCount), inbox ?? UserInboxType.Nothing, unread, userIconFactory)); }
public ActionResult <PartialFindResult <UserMessageContract> > GetMessages( int id, UserInboxType?inbox = null, bool unread = false, int?anotherUserId = null, int start = 0, int maxResults = 10, bool getTotalCount = false) { if (id != _permissionContext.LoggedUserId) { return(Forbid()); } return(_messageQueries.GetList(_permissionContext.LoggedUserId, new PagingProperties(start, maxResults, getTotalCount), inbox ?? UserInboxType.Nothing, unread, anotherUserId, _userIconFactory)); }
private UserMessagesContract CallGetList(bool unread = false) { return(queries.GetList(receiver.Id, new PagingProperties(0, 10, false), unread, new FakeUserIconFactory())); }
public ActionResult MessagesJson(int maxCount = 100, int start = 0, bool unread = false, int iconSize = 20) { var messages = messageQueries.GetList(LoggedUserId, new PagingProperties(start, maxCount, false), unread, new GravatarUserIconFactory(iconSize)); return(LowercaseJson(messages)); }
private PartialFindResult <UserMessageContract> CallGetList(UserInboxType inboxType, bool unread = false) { return(queries.GetList(receiver.Id, new PagingProperties(0, 10, true), inboxType, unread, null, new FakeUserIconFactory())); }