Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RewardAndRecognitionActivityHandler"/> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="localizer">The current cultures' string localizer.</param>
        /// <param name="telemetryClient">The application insights telemetry client. </param>
        /// <param name="options">The options.</param>
        /// <param name="telemetryOptions">Telemetry instrumentation key</param>
        /// <param name="configureAdminStorageProvider">Provider for fetching information about admin details from storage table.</param>
        /// <param name="teamStorageProvider">Provider for fetching information about team details from storage table.</param>
        /// <param name="awardsStorageProvider">Provider for fetching information about awards from storage table.</param>
        /// <param name="endorseDetailStorageProvider">Provider for fetching information about endorsement details from storage table.</param>
        /// <param name="rewardCycleStorageProvider">Provider for fetching information about active award cycle details from storage table.</param>
        /// <param name="nominateDetailSearchService">Provider to search nomination details in Azure search service.</param>
        /// <param name="botAdapter">Bot adapter.</param>
        /// <param name="microsoftAppCredentials">MicrosoftAppCredentials of bot.</param>
        public RewardAndRecognitionActivityHandler(
            ILogger <RewardAndRecognitionActivityHandler> logger,
            IStringLocalizer <Strings> localizer,
            TelemetryClient telemetryClient,
            IOptions <RewardAndRecognitionActivityHandlerOptions> options,
            IOptions <TelemetryOptions> telemetryOptions,
            IConfigureAdminStorageProvider configureAdminStorageProvider,
            ITeamStorageProvider teamStorageProvider,
            IAwardsStorageProvider awardsStorageProvider,
            IEndorseDetailStorageProvider endorseDetailStorageProvider,
            IRewardCycleStorageProvider rewardCycleStorageProvider,
            INominateDetailSearchService nominateDetailSearchService,
            BotFrameworkAdapter botAdapter,
            MicrosoftAppCredentials microsoftAppCredentials)
        {
            options          = options ?? throw new ArgumentNullException(nameof(options));
            telemetryOptions = telemetryOptions ?? throw new ArgumentNullException(nameof(telemetryOptions));

            this.logger                        = logger;
            this.localizer                     = localizer;
            this.telemetryClient               = telemetryClient;
            this.options                       = options;
            this.instrumentationKey            = telemetryOptions.Value.InstrumentationKey;
            this.appBaseUrl                    = this.options.Value.AppBaseUri;
            this.configureAdminStorageProvider = configureAdminStorageProvider;
            this.teamStorageProvider           = teamStorageProvider;
            this.awardsStorageProvider         = awardsStorageProvider;
            this.endorseDetailStorageProvider  = endorseDetailStorageProvider;
            this.rewardCycleStorageProvider    = rewardCycleStorageProvider;
            this.nominateDetailSearchService   = nominateDetailSearchService;
            this.botAdapter                    = botAdapter;
            this.microsoftAppCredentials       = microsoftAppCredentials;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NominateDetailController"/> class.
 /// </summary>
 /// <param name="logger">Sends logs to the Application Insights service.</param>
 /// <param name="storageProvider">Nominate award detail storage provider.</param>
 /// <param name="endorseStorageProvider">Endorse detail storage provider.</param>
 public NominateDetailController(ILogger <AwardsController> logger, INominateAwardStorageProvider storageProvider, IEndorseDetailStorageProvider endorseStorageProvider)
 {
     this.logger                 = logger;
     this.storageProvider        = storageProvider;
     this.endorseStorageProvider = endorseStorageProvider;
 }