Class NotificationClientBase
Contains functionality to manage and send notifications.
Inheritance
Implements
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsClients
Assembly: Stylelabs.M.Sdk.dll
Syntax
public abstract class NotificationClientBase : INotificationsClient
Constructors
NotificationClientBase(IMClient)
Declaration
public NotificationClientBase(IMClient client)
Parameters
Type | Name | Description |
---|---|---|
IMClient | client |
Methods
GetMailTemplateAsync(string, IEntityLoadConfiguration)
Gets an mail template entity by name.
Declaration
public Task<IMailTemplate> GetMailTemplateAsync(string name, IEntityLoadConfiguration loadConfiguration = null)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Name of the mail template. |
IEntityLoadConfiguration | loadConfiguration |
The load configuration. |
Returns
Type | Description |
---|---|
Task<>IMailTemplate |
The mail template entity or null if it does not exist. |
GetMailTemplateEntitiesAsync(IEnumerable<string>, IEntityLoadConfiguration)
Gets mail template entities by name. The result can have a different ordering and size (when entities don't exist) than the input.
Declaration
public Task<IList<IMailTemplateEntity>> GetMailTemplateEntitiesAsync(IEnumerable<string> names, IEntityLoadConfiguration loadConfiguration = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>string | names |
Names of the mail templates. |
IEntityLoadConfiguration | loadConfiguration |
The load configuration. |
Returns
Type | Description |
---|---|
Task<>IList<>IMailTemplateEntity |
The mail template entities. Can contain null when a mail template was not found. |
GetMailTemplateEntityAsync(string, IEntityLoadConfiguration)
Gets an mail template entity by name.
Declaration
public Task<IMailTemplateEntity> GetMailTemplateEntityAsync(string name, IEntityLoadConfiguration loadConfiguration = null)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Name of the mail template. |
IEntityLoadConfiguration | loadConfiguration |
The load configuration. |
Returns
Type | Description |
---|---|
Task<>IMailTemplateEntity |
The mail template entity or null if it does not exist. |
GetMailTemplatesAsync(IEnumerable<string>, IEntityLoadConfiguration)
Gets mail template entities by name. The result can have a different ordering and size (when entities don't exist) than the input.
Declaration
public Task<IList<IMailTemplate>> GetMailTemplatesAsync(IEnumerable<string> names, IEntityLoadConfiguration loadConfiguration = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>string | names |
Names of the mail templates. |
IEntityLoadConfiguration | loadConfiguration |
The load configuration. |
Returns
Type | Description |
---|---|
Task<>IList<>IMailTemplate |
The mail template entities. Can contain null when a mail template was not found. |
GetUserIdsAsync(IEnumerable<string>)
Get user ids.
Declaration
protected Task<IList<long>> GetUserIdsAsync(IEnumerable<string> usernames)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>string | usernames |
The user names. |
Returns
Type | Description |
---|---|
Task<>IList<>long |
The user ids. |
SendConfirmationEmailAsync(IEnumerable<long>)
Sends a registration confirmation e-mail to the specified users by id.
Declaration
public abstract Task SendConfirmationEmailAsync(IEnumerable<long> userIds)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>long | userIds |
Users that will receive the registration confirmation e-mail. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Remarks
This action requires the 'SendConfirmationEmail' privilege.
SendConfirmationEmailAsync(IEnumerable<string>)
Sends a registration confirmation e-mail to the specified users by username.
Declaration
public abstract Task SendConfirmationEmailAsync(IEnumerable<string> usernames)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>string | usernames |
Users that will receive the registration confirmation e-mail. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Remarks
This action requires the 'SendConfirmationEmail' privilege.
SendConfirmationEmailAsync(long)
Sends a registration confirmation e-mail to the specified user by id.
Declaration
public Task SendConfirmationEmailAsync(long userId)
Parameters
Type | Name | Description |
---|---|---|
long | userId |
User that will receive the registration confirmation e-mail. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Remarks
This action requires the 'SendConfirmationEmail' privilege.
SendConfirmationEmailAsync(params long[])
Sends a registration confirmation e-mail to the specified users by id.
Declaration
public Task SendConfirmationEmailAsync(params long[] userIds)
Parameters
Type | Name | Description |
---|---|---|
long | userIds |
Users that will receive the registration confirmation e-mail. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Remarks
This action requires the 'SendConfirmationEmail' privilege.
SendConfirmationEmailAsync(string)
Sends a registration confirmation e-mail to the specified user by username.
Declaration
public Task SendConfirmationEmailAsync(string username)
Parameters
Type | Name | Description |
---|---|---|
string | username |
User that will receive the registration confirmation e-mail. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Remarks
This action requires the 'SendConfirmationEmail' privilege.
SendConfirmationEmailAsync(params string[])
Sends a registration confirmation e-mail to the specified users by username.
Declaration
public Task SendConfirmationEmailAsync(params string[] usernames)
Parameters
Type | Name | Description |
---|---|---|
string | usernames |
Users that will receive the registration confirmation e-mail. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Remarks
This action requires the 'SendConfirmationEmail' privilege.
SendEmailNotificationAsync(MailRequestBroadcast)
Sends an e-mail to all users in M.
Declaration
public abstract Task SendEmailNotificationAsync(MailRequestBroadcast mailRequest)
Parameters
Type | Name | Description |
---|---|---|
MailRequestBroadcast | mailRequest |
Mail request information. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Exceptions
Type | Condition |
---|---|
ValidationException |
When |
SendEmailNotificationAsync(MailRequestById)
Sends an e-mail to users by user id.
Declaration
public abstract Task SendEmailNotificationAsync(MailRequestById mailRequest)
Parameters
Type | Name | Description |
---|---|---|
MailRequestById | mailRequest |
Mail request information. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Exceptions
Type | Condition |
---|---|
ValidationException |
When |
SendEmailNotificationAsync(MailRequestByUsername)
Sends an e-mail to users by username.
Declaration
public abstract Task SendEmailNotificationAsync(MailRequestByUsername mailRequest)
Parameters
Type | Name | Description |
---|---|---|
MailRequestByUsername | mailRequest |
Mail request information. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Exceptions
Type | Condition |
---|---|
ValidationException |
When |
SendRealTimeNotificationAsync(RealtimeRequestBroadcast)
Sends a real-time notification (browser notification) to all users in M.
Declaration
public abstract Task SendRealTimeNotificationAsync(RealtimeRequestBroadcast realtimeRequest)
Parameters
Type | Name | Description |
---|---|---|
RealtimeRequestBroadcast | realtimeRequest |
Real-time request information. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Exceptions
Type | Condition |
---|---|
ValidationException |
When |
SendRealTimeNotificationAsync(RealtimeRequestById)
Sends a real-time notification (browser notification) to users by user id.
Declaration
public abstract Task SendRealTimeNotificationAsync(RealtimeRequestById realtimeRequest)
Parameters
Type | Name | Description |
---|---|---|
RealtimeRequestById | realtimeRequest |
Real-time request information. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Exceptions
Type | Condition |
---|---|
ValidationException |
When |
SendRealTimeNotificationAsync(RealtimeRequestByUsername)
Sends a real-time notification (browser notification) to users by username.
Declaration
public abstract Task SendRealTimeNotificationAsync(RealtimeRequestByUsername realtimeRequest)
Parameters
Type | Name | Description |
---|---|---|
RealtimeRequestByUsername | realtimeRequest |
Real-time request information. |
Returns
Type | Description |
---|---|
Task |
An awaitable . |
Exceptions
Type | Condition |
---|---|
ValidationException |
When |