예제 #1
0
 private Task PublishNotificationToCreatedTopic(CreateTopicResponse topicResponse,
                                                EmailNotificationDto emailNotification)
 {
     return(SubscribeToTopic(topicResponse, AwsNotificationProtocolName,
                             emailNotification.Emails)
            .ContinueWith(response => PublishMessageToTopic(emailNotification.Content, topicResponse.TopicArn))
            .ContinueWith(response => DeleteTopic(topicResponse.TopicArn)));
 }
예제 #2
0
 public async Task NotifyAsync(EmailNotificationDto emailNotification)
 {
     await CreateSnsTopic(_topicNames[emailNotification.NotificationType])
     .ContinueWith(topicResponse => PublishNotificationToCreatedTopic(topicResponse.Result, emailNotification));
 }