Interface IUserNotificationRepository
Class for listing UserNotificationMessages
Namespace: EPiServer.Notification
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public interface IUserNotificationRepository
Methods
GetUserNotification(Int32)
Gets a single UserNotificationMessage given its id.
Declaration
UserNotificationMessage GetUserNotification(int notificationId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | notificationId | The id of the message. |
Returns
| Type | Description |
|---|---|
| UserNotificationMessage | A message. |
GetUserNotifications(UserNotificationsQuery, Int32, Int32, out Int32)
Gets a paged list of messages for a user
Declaration
IEnumerable<UserNotificationMessage> GetUserNotifications(UserNotificationsQuery query, int pageIndex, int pageSize, out int totalCount)
Parameters
| Type | Name | Description |
|---|---|---|
| UserNotificationsQuery | query | Query information |
| System.Int32 | pageIndex | The index of the page of results to return. pageIndex is zero-based. |
| System.Int32 | pageSize | The size of the page of results to return. |
| System.Int32 | totalCount | Total message count. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<UserNotificationMessage> |
GetUserNotificationsCount(UserNotificationsQuery)
Gets the total number of messages for a user
Declaration
int GetUserNotificationsCount(UserNotificationsQuery query)
Parameters
| Type | Name | Description |
|---|---|---|
| UserNotificationsQuery | query | Query information |
Returns
| Type | Description |
|---|---|
| System.Int32 |
MarkUserNotificationAsReadAsync(Int32)
Marks a message as read.
Declaration
Task MarkUserNotificationAsReadAsync(int notificationId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | notificationId | The message to mark as read. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Events
UserNotificationRead
Occurs when a usermessage is marked as read.
Declaration
event EventHandler<UserNotificationEventArgs> UserNotificationRead
Event Type
| Type | Description |
|---|---|
| System.EventHandler<UserNotificationEventArgs> |