A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Interface INotificationFormatter

Signature for components that formats NotificationMessage.

Namespace: EPiServer.Notification
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
public interface INotificationFormatter

Properties

SupportedChannelNames

Specifies which channels the formatter supports.

Declaration
IEnumerable<string> SupportedChannelNames { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

Methods

FormatMessagesAsync(IEnumerable<FormatterNotificationMessage>, String, NotificationFormat, String)

Performs formatting of messages.

Declaration
Task<IEnumerable<FormatterNotificationMessage>> FormatMessagesAsync(IEnumerable<FormatterNotificationMessage> notifications, string recipient, NotificationFormat format, string channelName)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<FormatterNotificationMessage> notifications

Messages to format

System.String recipient

The receiver of the message

NotificationFormat format

The format to format to

System.String channelName

The message channel

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<FormatterNotificationMessage>>

A list of formatted messages

Remarks

One use case for a formatter might be to combine several messages into one.

Extension Methods