Class NotificationClientBase

Current version: 3.4

Contains functionality to manage and send notifications.

Inheritance
object
NotificationClientBase
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsClients
Assembly: Stylelabs.M.Sdk.dll
Syntax
RequestResponse
public abstract class NotificationClientBase : INotificationsClient

Constructors

NotificationClientBase(IMClient)

Declaration
RequestResponse
public NotificationClientBase(IMClient client)
Parameters
TypeNameDescription
IMClientclient

Methods

GetMailTemplateAsync(string, IEntityLoadConfiguration)

Gets an mail template entity by name.

Declaration
RequestResponse
public Task<IMailTemplate> GetMailTemplateAsync(string name, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
stringname

Name of the mail template.

IEntityLoadConfigurationloadConfiguration

The load configuration.

Returns
TypeDescription
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
RequestResponse
public Task<IList<IMailTemplateEntity>> GetMailTemplateEntitiesAsync(IEnumerable<string> names, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
IEnumerable<>stringnames

Names of the mail templates.

IEntityLoadConfigurationloadConfiguration

The load configuration.

Returns
TypeDescription
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
RequestResponse
public Task<IMailTemplateEntity> GetMailTemplateEntityAsync(string name, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
stringname

Name of the mail template.

IEntityLoadConfigurationloadConfiguration

The load configuration.

Returns
TypeDescription
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
RequestResponse
public Task<IList<IMailTemplate>> GetMailTemplatesAsync(IEnumerable<string> names, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
IEnumerable<>stringnames

Names of the mail templates.

IEntityLoadConfigurationloadConfiguration

The load configuration.

Returns
TypeDescription
Task<>IList<>IMailTemplate

The mail template entities. Can contain null when a mail template was not found.

GetUserIdsAsync(IEnumerable<string>)

Get user ids.

Declaration
RequestResponse
protected Task<IList<long>> GetUserIdsAsync(IEnumerable<string> usernames)
Parameters
TypeNameDescription
IEnumerable<>stringusernames

The user names.

Returns
TypeDescription
Task<>IList<>long

The user ids.

SendConfirmationEmailAsync(IEnumerable<long>)

Sends a registration confirmation e-mail to the specified users by id.

Declaration
RequestResponse
public abstract Task SendConfirmationEmailAsync(IEnumerable<long> userIds)
Parameters
TypeNameDescription
IEnumerable<>longuserIds

Users that will receive the registration confirmation e-mail.

Returns
TypeDescription
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
RequestResponse
public abstract Task SendConfirmationEmailAsync(IEnumerable<string> usernames)
Parameters
TypeNameDescription
IEnumerable<>stringusernames

Users that will receive the registration confirmation e-mail.

Returns
TypeDescription
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
RequestResponse
public Task SendConfirmationEmailAsync(long userId)
Parameters
TypeNameDescription
longuserId

User that will receive the registration confirmation e-mail.

Returns
TypeDescription
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
RequestResponse
public Task SendConfirmationEmailAsync(params long[] userIds)
Parameters
TypeNameDescription
longuserIds

Users that will receive the registration confirmation e-mail.

Returns
TypeDescription
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
RequestResponse
public Task SendConfirmationEmailAsync(string username)
Parameters
TypeNameDescription
stringusername

User that will receive the registration confirmation e-mail.

Returns
TypeDescription
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
RequestResponse
public Task SendConfirmationEmailAsync(params string[] usernames)
Parameters
TypeNameDescription
stringusernames

Users that will receive the registration confirmation e-mail.

Returns
TypeDescription
Task

An awaitable .

Remarks

This action requires the 'SendConfirmationEmail' privilege.

SendEmailNotificationAsync(MailRequestBroadcast)

Sends an e-mail to all users in M.

Declaration
RequestResponse
public abstract Task SendEmailNotificationAsync(MailRequestBroadcast mailRequest)
Parameters
TypeNameDescription
MailRequestBroadcastmailRequest

Mail request information.

Returns
TypeDescription
Task

An awaitable .

Exceptions
TypeCondition
ValidationException

When mailRequest has invalid properties.

SendEmailNotificationAsync(MailRequestById)

Sends an e-mail to users by user id.

Declaration
RequestResponse
public abstract Task SendEmailNotificationAsync(MailRequestById mailRequest)
Parameters
TypeNameDescription
MailRequestByIdmailRequest

Mail request information.

Returns
TypeDescription
Task

An awaitable .

Exceptions
TypeCondition
ValidationException

When mailRequest has invalid properties.

SendEmailNotificationAsync(MailRequestByUsername)

Sends an e-mail to users by username.

Declaration
RequestResponse
public abstract Task SendEmailNotificationAsync(MailRequestByUsername mailRequest)
Parameters
TypeNameDescription
MailRequestByUsernamemailRequest

Mail request information.

Returns
TypeDescription
Task

An awaitable .

Exceptions
TypeCondition
ValidationException

When mailRequest has invalid properties.

SendRealTimeNotificationAsync(RealtimeRequestBroadcast)

Sends a real-time notification (browser notification) to all users in M.

Declaration
RequestResponse
public abstract Task SendRealTimeNotificationAsync(RealtimeRequestBroadcast realtimeRequest)
Parameters
TypeNameDescription
RealtimeRequestBroadcastrealtimeRequest

Real-time request information.

Returns
TypeDescription
Task

An awaitable .

Exceptions
TypeCondition
ValidationException

When realtimeRequest has invalid properties.

SendRealTimeNotificationAsync(RealtimeRequestById)

Sends a real-time notification (browser notification) to users by user id.

Declaration
RequestResponse
public abstract Task SendRealTimeNotificationAsync(RealtimeRequestById realtimeRequest)
Parameters
TypeNameDescription
RealtimeRequestByIdrealtimeRequest

Real-time request information.

Returns
TypeDescription
Task

An awaitable .

Exceptions
TypeCondition
ValidationException

When realtimeRequest has invalid properties.

SendRealTimeNotificationAsync(RealtimeRequestByUsername)

Sends a real-time notification (browser notification) to users by username.

Declaration
RequestResponse
public abstract Task SendRealTimeNotificationAsync(RealtimeRequestByUsername realtimeRequest)
Parameters
TypeNameDescription
RealtimeRequestByUsernamerealtimeRequest

Real-time request information.

Returns
TypeDescription
Task

An awaitable .

Exceptions
TypeCondition
ValidationException

When realtimeRequest has invalid properties.

Implements

Do you have some feedback for us?

If you have suggestions for improving this article,