Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RewardCycleBackgroundServiceHelper"/> class.
 /// </summary>
 /// <param name="rewardCycleStorageProvider">Reward cycle storage provider.</param>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 public RewardCycleBackgroundServiceHelper(
     IRewardCycleStorageProvider rewardCycleStorageProvider,
     ILogger <RewardCycleBackgroundServiceHelper> logger)
 {
     this.rewardCycleStorageProvider = rewardCycleStorageProvider;
     this.logger = logger;
 }
Exemplo n.º 2
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;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationHelper"/> class.
 /// </summary>
 /// <param name="rewardCycleStorageProvider">Reward cycle storage provider.</param>
 /// <param name="awardsStorageProvider">Award storage provider.</param>
 /// <param name="teamStorageProvider">Teams storage provider.</param>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 /// <param name="localizer">The current cultures' string localizer.</param>
 /// <param name="options">A set of key/value application configuration properties.</param>
 /// <param name="adapter">Bot adapter.</param>
 /// <param name="microsoftAppCredentials">MicrosoftAppCredentials of bot.</param>
 public NotificationHelper(
     IRewardCycleStorageProvider rewardCycleStorageProvider,
     ITeamStorageProvider teamStorageProvider,
     IAwardsStorageProvider awardsStorageProvider,
     ILogger <RewardCycleHelper> logger,
     IStringLocalizer <Strings> localizer,
     IOptions <RewardAndRecognitionActivityHandlerOptions> options,
     IBotFrameworkHttpAdapter adapter,
     MicrosoftAppCredentials microsoftAppCredentials)
 {
     this.rewardCycleStorageProvider = rewardCycleStorageProvider;
     this.logger    = logger;
     this.localizer = localizer;
     this.options   = options ?? throw new ArgumentNullException(nameof(options));
     this.adapter   = adapter;
     this.microsoftAppCredentials = microsoftAppCredentials;
     this.awardsStorageProvider   = awardsStorageProvider;
     this.teamStorageProvider     = teamStorageProvider;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RewardCycleController"/> class.
 /// </summary>
 /// <param name="logger">Sends logs to the application insights service.</param>
 /// <param name="storageProvider">Reward cycle storage provider.</param>
 public RewardCycleController(ILogger <RewardCycleController> logger, IRewardCycleStorageProvider storageProvider)
 {
     this.logger          = logger;
     this.storageProvider = storageProvider;
 }