/// <summary>
 /// Initializes a new instance of the <see cref="GetRecipientDataListForAllUsersActivity"/> class.
 /// </summary>
 /// <param name="sentNotificationDataRepository">Sent notification data repository.</param>
 /// <param name="sendBatchesDataRepository">The send batches data repository.</param>
 public GetRecipientDataListForAllUsersActivity(
     SentNotificationDataRepository sentNotificationDataRepository,
     SendBatchesDataRepository sendBatchesDataRepository)
 {
     this.sentNotificationDataRepository = sentNotificationDataRepository;
     this.sendBatchesDataRepository      = sendBatchesDataRepository;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProcessRecipientDataListActivity"/> class.
 /// </summary>
 /// <param name="sentNotificationDataRepository">The sent notification data repository.</param>
 /// <param name="sendBatchesDataRepository">The send batches data repository.</param>
 public ProcessRecipientDataListActivity(
     SentNotificationDataRepository sentNotificationDataRepository,
     SendBatchesDataRepository sendBatchesDataRepository)
 {
     this.sentNotificationDataRepository = sentNotificationDataRepository;
     this.sendBatchesDataRepository      = sendBatchesDataRepository;
 }
 /// <summary>
 /// Gets the partition key for a batch in the SendBatchesData table by appending
 /// a recipient data batch suffix to the notification Id.
 /// </summary>
 /// <param name="sendBatchesDataRepository">The send batches data repository.</param>
 /// <param name="notificationId">The notification Id.</param>
 /// <param name="batchIndex">The batch index.</param>
 /// <returns>The partition key of the corresponding batch.</returns>
 public static string GetBatchPartitionKey(
     this SendBatchesDataRepository sendBatchesDataRepository,
     string notificationId,
     int batchIndex)
 {
     return($"{notificationId}-batch{batchIndex}");
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SentNotificationsController"/> class.
 /// </summary>
 /// <param name="notificationDataRepository">Notification data repository service that deals with the table storage in azure.</param>
 /// <param name="sentNotificationDataRepository">Sent notification data repository.</param>
 /// <param name="teamDataRepository">Team data repository instance.</param>
 /// <param name="prepareToSendQueue">The service bus queue for preparing to send notifications.</param>
 /// <param name="dataQueue">The service bus queue for the data queue.</param>
 /// <param name="dataQueueMessageOptions">The options for the data queue messages.</param>
 /// <param name="sendBatchesDataRepository">The send batches data repository.</param>
 /// <param name="groupsService">The groups service.</param>
 /// <param name="exportDataRepository">The Export data repository instance.</param>
 public SentNotificationsController(
     NotificationDataRepository notificationDataRepository,
     SentNotificationDataRepository sentNotificationDataRepository,
     TeamDataRepository teamDataRepository,
     PrepareToSendQueue prepareToSendQueue,
     DataQueue dataQueue,
     IOptions <DataQueueMessageOptions> dataQueueMessageOptions,
     SendBatchesDataRepository sendBatchesDataRepository,
     IGroupsService groupsService,
     ExportDataRepository exportDataRepository)
 {
     this.notificationDataRepository     = notificationDataRepository;
     this.sentNotificationDataRepository = sentNotificationDataRepository;
     this.teamDataRepository             = teamDataRepository;
     this.prepareToSendQueue             = prepareToSendQueue;
     this.dataQueue = dataQueue;
     this.forceCompleteMessageDelayInSeconds = dataQueueMessageOptions.Value.ForceCompleteMessageDelayInSeconds;
     this.sendBatchesDataRepository          = sendBatchesDataRepository;
     this.groupsService        = groupsService;
     this.exportDataRepository = exportDataRepository;
 }