Class SmsNotificationHandler
SMS notification handler using Amazon Simple Notification Service (SNS).
Inherited Members
Namespace: Innovt.Cloud.AWS.Notification
Assembly: Innovt.Cloud.AWS.Notification.dll
Syntax
public class SmsNotificationHandler : AwsBaseService, IDisposable, INotificationHandler
Constructors
| Edit this page View SourceSmsNotificationHandler(ILogger, IAwsConfiguration)
Initializes a new instance of the SmsNotificationHandler class.
Declaration
public SmsNotificationHandler(ILogger logger, IAwsConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The logger. |
IAwsConfiguration | configuration | The AWS configuration. |
SmsNotificationHandler(ILogger, IAwsConfiguration, string)
Initializes a new instance of the SmsNotificationHandler class with a specific AWS region.
Declaration
public SmsNotificationHandler(ILogger logger, IAwsConfiguration configuration, string region)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The logger. |
IAwsConfiguration | configuration | The AWS configuration. |
string | region | The AWS region. |
Methods
| Edit this page View SourceDisposeServices()
Disposes the resources used by the SMS notification handler.
Declaration
protected override void DisposeServices()
Overrides
| Edit this page View SourceSendAsync(NotificationMessage, CancellationToken)
Sends an SMS notification asynchronously.
Declaration
public Task<dynamic> SendAsync(NotificationMessage message, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
NotificationMessage | message | The notification message. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<dynamic> | A dynamic result representing the delivery status of the SMS. |