Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SyncPairUpMembersActivity"/> class.
 /// </summary>
 /// <param name="memberService">Teams member service.</param>
 /// <param name="appSettingsService">App settings service.</param>
 /// <param name="teamUserPairUpMappingRepository">Team user pair-up mapping repository.</param>
 /// <param name="options">A set of key/value application configuration properties for application settings.</param>
 public SyncPairUpMembersActivity(
     ITeamMembersService memberService,
     IAppSettingsService appSettingsService,
     TeamUserPairUpMappingRepository teamUserPairUpMappingRepository,
     IOptions <ConfidentialClientApplicationOptions> options)
 {
     this.memberService      = memberService ?? throw new ArgumentNullException(nameof(memberService));
     this.appSettingsService = appSettingsService ?? throw new ArgumentNullException(nameof(appSettingsService));
     this.teamUserPairUpMappingRepository = teamUserPairUpMappingRepository ?? throw new ArgumentNullException(nameof(teamUserPairUpMappingRepository));
     this.options = options ?? throw new ArgumentNullException(nameof(options));
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SentNotificationsController"/> class.
        /// </summary>
        /// <param name="channelDataRepository">Channel data repository service that deals with the table storage in azure.</param>
        /// <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="sentNotificationUpdateDataRepository">Sent update notification data repository.</param>
        /// <param name="sentNotificationDataRepstry">Sent notification data repository to Get Likes.</param>
        /// <param name="teamDataRepository">Team data repository instance.</param>
        /// <param name="distributionListDataRepository">DistributionList data repository instance.</param>
        /// <param name="prepareToSendQueue">The service bus queue for preparing to send notifications.</param>
        /// <param name="sendQueue">The service bus queue for the send queue.</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="memberService">The meber info service.</param>
        /// <param name="reactionService">The reaction of message 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>
        /// <param name="configuration">The Configuration.</param>
        /// <param name="botOptions">bot options.</param>
        public SentNotificationsController(
            IChannelDataRepository channelDataRepository,
            INotificationDataRepository notificationDataRepository,
            ISentUpdateandDeleteNotificationDataRepository sentNotificationDataRepository,
            ISentUpdateDataRepository sentNotificationUpdateDataRepository,
            ISentNotificationDataRepository sentNotificationDataRepstry,
            ITeamDataRepository teamDataRepository,
            IDistributionListDataRepository distributionListDataRepository,
            IPrepareToSendQueue prepareToSendQueue,
            ISendQueue sendQueue,
            IDataQueue dataQueue,
            IOptions <DataQueueMessageOptions> dataQueueMessageOptions,
            IGroupsService groupsService,
            IMessageReactionService reactionService,
            ITeamMembersService memberService,
            IExportDataRepository exportDataRepository,
            IAppCatalogService appCatalogService,
            IAppSettingsService appSettingsService,
            IOptions <UserAppOptions> userAppOptions,
            ILoggerFactory loggerFactory,
            IConfiguration configuration,
            IOptions <BotOptions> botOptions)
        {
            if (dataQueueMessageOptions is null)
            {
                throw new ArgumentNullException(nameof(dataQueueMessageOptions));
            }

            var options = botOptions ?? throw new ArgumentNullException(nameof(botOptions));

            this.channelDataRepository                = channelDataRepository ?? throw new ArgumentNullException(nameof(channelDataRepository));
            this.notificationDataRepository           = notificationDataRepository ?? throw new ArgumentNullException(nameof(notificationDataRepository));
            this.sentNotificationDataRepository       = sentNotificationDataRepository ?? throw new ArgumentNullException(nameof(sentNotificationDataRepository));
            this.sentNotificationUpdateDataRepository = sentNotificationUpdateDataRepository ?? throw new ArgumentException(nameof(sentNotificationUpdateDataRepository));
            this.sentNotificationDataRepstry          = sentNotificationDataRepstry ?? throw new ArgumentNullException(nameof(sentNotificationDataRepstry));
            this.teamDataRepository             = teamDataRepository ?? throw new ArgumentNullException(nameof(teamDataRepository));
            this.distributionListDataRepository = distributionListDataRepository ?? throw new ArgumentNullException(nameof(distributionListDataRepository));
            this.prepareToSendQueue             = prepareToSendQueue ?? throw new ArgumentNullException(nameof(prepareToSendQueue));
            this.sendQueue = sendQueue ?? throw new ArgumentNullException(nameof(sendQueue));
            this.dataQueue = dataQueue ?? throw new ArgumentNullException(nameof(dataQueue));
            this.forceCompleteMessageDelayInSeconds = dataQueueMessageOptions.Value.ForceCompleteMessageDelayInSeconds;
            this.groupsService        = groupsService ?? throw new ArgumentNullException(nameof(groupsService));
            this.reactionService      = reactionService ?? throw new ArgumentNullException(nameof(reactionService));
            this.memberService        = memberService ?? throw new ArgumentNullException(nameof(memberService));
            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));
            this.account       = string.Empty;
            this.configuration = configuration;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SyncTeamMembersActivity"/> class.
 /// </summary>
 /// <param name="teamDataRepository">Team Data repository.</param>
 /// <param name="memberService">Teams member service.</param>
 /// <param name="notificationDataRepository">Notification data repository.</param>
 /// <param name="sentNotificationDataRepository">Sent notification data repository.</param>
 /// <param name="localizer">Localization service.</param>
 /// <param name="userDataRepository">User Data repository.</param>
 public SyncTeamMembersActivity(
     ITeamDataRepository teamDataRepository,
     ITeamMembersService memberService,
     INotificationDataRepository notificationDataRepository,
     ISentNotificationDataRepository sentNotificationDataRepository,
     IStringLocalizer <Strings> localizer,
     IUserDataRepository userDataRepository)
 {
     this.teamDataRepository             = teamDataRepository ?? throw new ArgumentNullException(nameof(teamDataRepository));
     this.memberService                  = memberService ?? throw new ArgumentNullException(nameof(memberService));
     this.notificationDataRepository     = notificationDataRepository ?? throw new ArgumentNullException(nameof(notificationDataRepository));
     this.sentNotificationDataRepository = sentNotificationDataRepository ?? throw new ArgumentNullException(nameof(sentNotificationDataRepository));
     this.localizer          = localizer ?? throw new ArgumentNullException(nameof(localizer));
     this.userDataRepository = userDataRepository ?? throw new ArgumentNullException(nameof(userDataRepository));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ExportFunction"/> class.
 /// </summary>
 /// <param name="notificationDataRepository">Notification data repository.</param>
 /// <param name="exportDataRepository">Export data repository.</param>
 /// <param name="localizer">Localization service.</param>
 public ExportFunction(
     INotificationDataRepository notificationDataRepository,
     IExportDataRepository exportDataRepository,
     IStringLocalizer <Strings> localizer,
     ITeamMembersService memberService,
     IUserDataRepository userDataRepository,
     ITeamDataRepository teamDataRepository
     )
 {
     this.notificationDataRepository = notificationDataRepository ?? throw new ArgumentNullException(nameof(notificationDataRepository));
     this.exportDataRepository       = exportDataRepository ?? throw new ArgumentNullException(nameof(exportDataRepository));
     this.localizer          = localizer ?? throw new ArgumentNullException(nameof(localizer));
     this.memberService      = memberService ?? throw new ArgumentNullException(nameof(memberService));
     this.userDataRepository = userDataRepository ?? throw new ArgumentNullException(nameof(userDataRepository));
     this.teamDataRepository = teamDataRepository ?? throw new ArgumentNullException(nameof(teamDataRepository));
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="MemberValidationHelper"/> class.
        /// </summary>
        /// <param name="authenticationOptions">Represents a set of key/value bot settings.</param>
        /// <param name="memberService">Teams member service.</param>
        /// <param name="appSettingsService">App settings service.</param>
        /// <param name="memoryCache">MemoryCache instance for caching authorization result.</param>
        /// <param name="logger">Logger implementation to send logs to the logger service.</param>
        public MemberValidationHelper(
            IOptions<AuthenticationOptions> authenticationOptions,
            IAppSettingsService appSettingsService,
            ITeamMembersService memberService,
            IMemoryCache memoryCache,
            ILogger<MemberValidationHelper> logger)
        {
            authenticationOptions = authenticationOptions ?? throw new ArgumentNullException(nameof(authenticationOptions));
            this.memberService = memberService ?? throw new ArgumentNullException(nameof(memberService));
            this.appSettingsService = appSettingsService ?? throw new ArgumentNullException(nameof(appSettingsService));
            this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
            this.memoryCache = memoryCache ?? throw new ArgumentNullException(nameof(memoryCache));

            this.adminTeamId = authenticationOptions.Value.AdminTeamId;
            this.tenantId = authenticationOptions.Value.AzureAdTenantId;
        }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExportController"/> class.
 /// </summary>
 /// <param name="sentNotificationDataRepository">SentNotification data repository instance.</param>
 /// <param name="exportDataRepository">Export data repository instance.</param>
 /// <param name="userDataRepository">User data repository instance.</param>
 /// <param name="exportQueue">The service bus queue for the export queue.</param>
 /// <param name="memberService">Teams member service.</param>
 /// <param name="teamDataRepository">Team data reporsitory.</param>
 /// <param name="appSettingsService">App Settings service.</param>
 public ExportController(
     ISentNotificationDataRepository sentNotificationDataRepository,
     IExportDataRepository exportDataRepository,
     IUserDataRepository userDataRepository,
     IExportQueue exportQueue,
     ITeamMembersService memberService,
     ITeamDataRepository teamDataRepository,
     IAppSettingsService appSettingsService)
 {
     this.sentNotificationDataRepository = sentNotificationDataRepository ?? throw new ArgumentNullException(nameof(sentNotificationDataRepository));
     this.exportDataRepository           = exportDataRepository ?? throw new ArgumentNullException(nameof(exportDataRepository));
     this.userDataRepository             = userDataRepository ?? throw new ArgumentNullException(nameof(userDataRepository));
     this.exportQueue        = exportQueue ?? throw new ArgumentNullException(nameof(exportQueue));
     this.memberService      = memberService ?? throw new ArgumentNullException(nameof(memberService));
     this.teamDataRepository = teamDataRepository ?? throw new ArgumentNullException(nameof(teamDataRepository));
     this.appSettingsService = appSettingsService ?? throw new ArgumentNullException(nameof(appSettingsService));
 }
Esempio n. 7
0
 public BackendController(ITeamMembersService teamMembersService)
 {
     _teamMembersService = teamMembersService;
 }
Esempio n. 8
0
 public TeamMembersHealthCheck(ITeamMembersService service)
 {
     _service = service;
 }
 public TeamMembersController(ITeamMembersService service, ILogger <TeamMembersController> logger)
 {
     _service = service;
     _logger  = logger;
 }