コード例 #1
0
 private Task PublishNotificationToCreatedTopic(CreateTopicResponse topicResponse,
                                                SmsNotificationDto smsNotification)
 {
     return(SubscribeToTopic(topicResponse, AwsNotificationProtocolName,
                             smsNotification.PhoneNumbers)
            .ContinueWith(response => PublishMessageToTopic(smsNotification.Content, topicResponse.TopicArn))
            .ContinueWith(response => DeleteTopic(topicResponse.TopicArn)));
 }
コード例 #2
0
 public async Task NotifyAsync(SmsNotificationDto smsNotification)
 {
     await CreateSnsTopic(_topicNames[smsNotification.NotificationType])
     .ContinueWith(topicResponse => PublishNotificationToCreatedTopic(topicResponse.Result, smsNotification));
 }