/// <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="groupsService">The groups service.</param>
        /// <param name="exportDataRepository">The Export data repository instance.</param>
        /// <param name="appCatalogService">App catalog service.</param>
        /// <param name="appSettingsService">App settings service.</param>
        /// <param name="userAppOptions">User app options.</param>
        /// <param name="loggerFactory">The logger factory.</param>
        public SentNotificationsController(
            NotificationDataRepository notificationDataRepository,
            SentNotificationDataRepository sentNotificationDataRepository,
            TeamDataRepository teamDataRepository,
            PrepareToSendQueue prepareToSendQueue,
            DataQueue dataQueue,
            IOptions <DataQueueMessageOptions> dataQueueMessageOptions,
            IGroupsService groupsService,
            ExportDataRepository exportDataRepository,
            IAppCatalogService appCatalogService,
            IAppSettingsService appSettingsService,
            IOptions <UserAppOptions> userAppOptions,
            ILoggerFactory loggerFactory)
        {
            if (dataQueueMessageOptions is null)
            {
                throw new ArgumentNullException(nameof(dataQueueMessageOptions));
            }

            this.notificationDataRepository     = notificationDataRepository ?? throw new ArgumentNullException(nameof(notificationDataRepository));
            this.sentNotificationDataRepository = sentNotificationDataRepository ?? throw new ArgumentNullException(nameof(sentNotificationDataRepository));
            this.teamDataRepository             = teamDataRepository ?? throw new ArgumentNullException(nameof(teamDataRepository));
            this.prepareToSendQueue             = prepareToSendQueue ?? throw new ArgumentNullException(nameof(prepareToSendQueue));
            this.dataQueue = dataQueue ?? throw new ArgumentNullException(nameof(dataQueue));
            this.forceCompleteMessageDelayInSeconds = dataQueueMessageOptions.Value.ForceCompleteMessageDelayInSeconds;
            this.groupsService        = groupsService ?? throw new ArgumentNullException(nameof(groupsService));
            this.exportDataRepository = exportDataRepository ?? throw new ArgumentNullException(nameof(exportDataRepository));
            this.appCatalogService    = appCatalogService ?? throw new ArgumentNullException(nameof(appCatalogService));
            this.appSettingsService   = appSettingsService ?? throw new ArgumentNullException(nameof(appSettingsService));
            this.userAppOptions       = userAppOptions?.Value ?? throw new ArgumentNullException(nameof(userAppOptions));
            this.logger = loggerFactory?.CreateLogger <SentNotificationsController>() ?? throw new ArgumentNullException(nameof(loggerFactory));
        }
 /// <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;
 }