/// <summary> /// Initializes a new instance of the <see cref="MessagingExtensionHelper"/> class. /// </summary> /// <param name="localizer">The current cultures' string localizer.</param> /// <param name="teamIdeaSearchService">The team ideas search service dependency injection.</param> /// <param name="categoryStorageProvider">The idea category storage provider.</param> /// <param name="options">>A set of key/value application configuration properties for activity handler.</param> public MessagingExtensionHelper( IStringLocalizer<Strings> localizer, IIdeaSearchService teamIdeaSearchService, ICategoryStorageProvider categoryStorageProvider, IOptions<BotSettings> options) { this.localizer = localizer; this.teamIdeaSearchService = teamIdeaSearchService; this.categoryStorageProvider = categoryStorageProvider; this.options = options; }
/// <summary> /// Initializes a new instance of the <see cref="CategoryController"/> class. /// </summary> /// <param name="categoryStorageProvider">Category storage provider instance.</param> /// <param name="teamIdeaSearchService">Idea search service provider instance.</param> /// <param name="logger">Logger implementation to send logs to the logger service.</param> /// <param name="telemetryClient">The Application Insights telemetry client.</param> public CategoryController( ICategoryStorageProvider categoryStorageProvider, IIdeaSearchService teamIdeaSearchService, ILogger <CategoryController> logger, TelemetryClient telemetryClient) : base(telemetryClient) { this.logger = logger; this.storageProvider = categoryStorageProvider; this.teamIdeaSearchService = teamIdeaSearchService; }
/// <summary> /// Initializes a new instance of the <see cref="TeamPreferenceController"/> class. /// </summary> /// <param name="logger">Logger implementation to send logs to the logger service.</param> /// <param name="telemetryClient">The Application Insights telemetry client.</param> /// <param name="teamPreferenceStorageHelper">Team preference storage helper dependency injection.</param> /// <param name="teamPreferenceStorageProvider">Team preference storage provider dependency injection.</param> /// <param name="teamIdeaSearchService">The team post search service dependency injection.</param> public TeamPreferenceController( ILogger <TeamPreferenceController> logger, TelemetryClient telemetryClient, ITeamPreferenceStorageHelper teamPreferenceStorageHelper, ITeamPreferenceStorageProvider teamPreferenceStorageProvider, IIdeaSearchService teamIdeaSearchService) : base(telemetryClient) { this.logger = logger; this.teamPreferenceStorageHelper = teamPreferenceStorageHelper; this.teamPreferenceStorageProvider = teamPreferenceStorageProvider; this.teamIdeaSearchService = teamIdeaSearchService; }
/// <summary> /// Initializes a new instance of the <see cref="TeamIdeaController"/> class. /// </summary> /// <param name="logger">Logger implementation to send logs to the logger service.</param> /// <param name="telemetryClient">The Application Insights telemetry client.</param> /// <param name="ideaStorageHelper">Team post storage helper dependency injection.</param> /// <param name="ideaSearchService">The team post search service dependency injection.</param> /// <param name="teamCategoryStorageProvider">Team category storage provider dependency injection.</param> /// <param name="categoryStorageProvider">Category storage provider dependency injection.</param> public TeamIdeaController( ILogger <IdeaController> logger, TelemetryClient telemetryClient, IIdeaStorageHelper ideaStorageHelper, IIdeaSearchService ideaSearchService, ITeamCategoryStorageProvider teamCategoryStorageProvider, ICategoryStorageProvider categoryStorageProvider) : base(telemetryClient) { this.logger = logger; this.ideaStorageHelper = ideaStorageHelper; this.ideaSearchService = ideaSearchService; this.teamCategoryStorageProvider = teamCategoryStorageProvider; this.categoryStorageProvider = categoryStorageProvider; }
/// <summary> /// Initializes a new instance of the <see cref="UserVoteController"/> class. /// </summary> /// <param name="logger">Logger implementation to send logs to the logger service.</param> /// <param name="telemetryClient">The Application Insights telemetry client.</param> /// <param name="userVoteStorageProvider">Instance of user vote storage provider to add and delete user vote.</param> /// <param name="teamIdeaStorageProvider">Instance of team post storage provider to update post and get information of posts.</param> /// <param name="teamIdeaSearchService">The team post search service dependency injection.</param> public UserVoteController( ILogger <UserVoteController> logger, TelemetryClient telemetryClient, IUserVoteStorageProvider userVoteStorageProvider, IIdeaStorageProvider teamIdeaStorageProvider, IIdeaSearchService teamIdeaSearchService) : base(telemetryClient) { this.logger = logger; this.userVoteStorageProvider = userVoteStorageProvider; this.teamIdeaStorageProvider = teamIdeaStorageProvider; this.teamIdeaSearchService = teamIdeaSearchService; this.retryPolicy = Policy.Handle <StorageException>(ex => ex.RequestInformation.HttpStatusCode == StatusCodes.Status412PreconditionFailed) .WaitAndRetryAsync(Backoff.ConstantBackoff(TimeSpan.FromMilliseconds(250), 25)); }
/// <summary> /// Initializes a new instance of the <see cref="DigestNotificationHelper"/> class. /// </summary> /// <param name="logger">Logger implementation to send logs to the logger service.</param> /// <param name="localizer">The current cultures' string localizer.</param> /// <param name="botOptions">A set of key/value application configuration properties for bot.</param> /// <param name="adapter">Bot adapter.</param> /// <param name="teamPreferenceStorageProvider">Storage provider for team preference.</param> /// <param name="teamIdeaSearchService">The team idea search service dependency injection.</param> /// <param name="teamIdeaStorageHelper">Team idea storage helper dependency injection.</param> /// <param name="teamStorageProvider">Team storage provider dependency injection.</param> public DigestNotificationHelper( ILogger <DigestNotificationHelper> logger, IStringLocalizer <Strings> localizer, IOptions <BotSettings> botOptions, IBotFrameworkHttpAdapter adapter, ITeamPreferenceStorageProvider teamPreferenceStorageProvider, IIdeaSearchService teamIdeaSearchService, IIdeaStorageHelper teamIdeaStorageHelper, ITeamStorageProvider teamStorageProvider) { this.logger = logger; this.localizer = localizer; this.botOptions = botOptions ?? throw new ArgumentNullException(nameof(botOptions)); this.adapter = adapter; this.teamPreferenceStorageProvider = teamPreferenceStorageProvider; this.teamIdeaSearchService = teamIdeaSearchService; this.teamIdeaStorageHelper = teamIdeaStorageHelper; this.teamStorageProvider = teamStorageProvider; }