Interface IUserNotificationRepository
Class for listing UserNotificationMessages
Namespace: EPiServer.Notification
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public interface IUserNotificationRepository
Methods
add_UserNotificationMissing(AsyncEventHandler<UserNotificationEventArgs>)
Declaration
void add_UserNotificationMissing(AsyncEventHandler<UserNotificationEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
AsyncEventHandler<UserNotificationEventArgs> | value |
add_UserNotificationRead(AsyncEventHandler<UserNotificationEventArgs>)
Declaration
void add_UserNotificationRead(AsyncEventHandler<UserNotificationEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
AsyncEventHandler<UserNotificationEventArgs> | value |
add_UserNotificationReads(AsyncEventHandler<UserNotificationsEventArgs>)
Declaration
void add_UserNotificationReads(AsyncEventHandler<UserNotificationsEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
AsyncEventHandler<UserNotificationsEventArgs> | value |
GetUserNotificationAsync(INotificationUser, Int32, UserNotificationFormattingMode)
Gets a single UserNotificationMessage given its id.
Declaration
Task<UserNotificationMessage> GetUserNotificationAsync(INotificationUser user, int notificationId, UserNotificationFormattingMode formattingMode)
Parameters
Type | Name | Description |
---|---|---|
INotificationUser | user | The recipient of the message. |
System.Int32 | notificationId | The id of the message. |
UserNotificationFormattingMode | formattingMode | The formatting mode of the result. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<UserNotificationMessage> | A message. |
GetUserNotificationsAsync(UserNotificationsQuery, Int64, Int32, UserNotificationFormattingMode)
Gets a paged list of messages for a user.
Declaration
Task<PagedUserNotificationMessageResult> GetUserNotificationsAsync(UserNotificationsQuery query, long startIndex, int maxRows, UserNotificationFormattingMode formattingMode)
Parameters
Type | Name | Description |
---|---|---|
UserNotificationsQuery | query | Query information |
System.Int64 | startIndex | The start index, used for paging |
System.Int32 | maxRows | The maximum number of rows returned |
UserNotificationFormattingMode | formattingMode | The formatting mode of the result. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PagedUserNotificationMessageResult> |
GetUserNotificationsCountAsync(UserNotificationsQuery)
Gets the total number of messages for a user.
Declaration
Task<int> GetUserNotificationsCountAsync(UserNotificationsQuery query)
Parameters
Type | Name | Description |
---|---|---|
UserNotificationsQuery | query | Query information |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
MarkUserNotificationAsReadAsync(INotificationUser, Int32)
Marks a message as read.
Declaration
Task MarkUserNotificationAsReadAsync(INotificationUser user, int notificationId)
Parameters
Type | Name | Description |
---|---|---|
INotificationUser | user | The recipient of the message. |
System.Int32 | notificationId | The message to mark as read. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
MarkUserNotificationsAsReadAsync(INotificationUser)
Marks all messages for a user as read.
Declaration
Task MarkUserNotificationsAsReadAsync(INotificationUser user)
Parameters
Type | Name | Description |
---|---|---|
INotificationUser | user | The recipient of the message. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
MarkUserNotificationsAsReadAsync(INotificationUser, String)
Marks all messages for a user on a specific channel as read.
Declaration
Task MarkUserNotificationsAsReadAsync(INotificationUser user, string channelName)
Parameters
Type | Name | Description |
---|---|---|
INotificationUser | user | The recipient of the message. |
System.String | channelName | The name of the channel. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
remove_UserNotificationMissing(AsyncEventHandler<UserNotificationEventArgs>)
Declaration
void remove_UserNotificationMissing(AsyncEventHandler<UserNotificationEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
AsyncEventHandler<UserNotificationEventArgs> | value |
remove_UserNotificationRead(AsyncEventHandler<UserNotificationEventArgs>)
Declaration
void remove_UserNotificationRead(AsyncEventHandler<UserNotificationEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
AsyncEventHandler<UserNotificationEventArgs> | value |
remove_UserNotificationReads(AsyncEventHandler<UserNotificationsEventArgs>)
Declaration
void remove_UserNotificationReads(AsyncEventHandler<UserNotificationsEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
AsyncEventHandler<UserNotificationsEventArgs> | value |
Events
UserNotificationMissing
Occurs when notification cannot be found by its id.
Declaration
event AsyncEventHandler<UserNotificationEventArgs> UserNotificationMissing
Event Type
Type | Description |
---|---|
AsyncEventHandler<UserNotificationEventArgs> |
UserNotificationRead
Occurs when a notification is marked as read.
Declaration
event AsyncEventHandler<UserNotificationEventArgs> UserNotificationRead
Event Type
Type | Description |
---|---|
AsyncEventHandler<UserNotificationEventArgs> |
UserNotificationReads
Occurs when the MarkUserNotificationAsRead method is called.
Declaration
event AsyncEventHandler<UserNotificationsEventArgs> UserNotificationReads
Event Type
Type | Description |
---|---|
AsyncEventHandler<UserNotificationsEventArgs> |