/// <summary> /// Initializes a new instance of the <see cref="UserStorageHelper"/> class. /// </summary> /// <param name="logger">Instance to send logs to the Application Insights service.</param> /// <param name="userResponseStorageProvider">Company response storage provider dependency injection.</param> public UserStorageHelper( ILogger <UserStorageHelper> logger, IUserResponseStorageProvider userResponseStorageProvider) { this.logger = logger; this.userResponseStorageProvider = userResponseStorageProvider; }
/// <summary> /// Initializes a new instance of the <see cref="UserResponseController"/> class. /// </summary> /// <param name="logger">Sends logs to the Application Insights service.</param> /// <param name="userResponseStorageProvider">User response storage provider dependency injection.</param> /// <param name="telemetryClient">The Application Insights telemetry client.</param> public UserResponseController( ILogger<UserResponseController> logger, IUserResponseStorageProvider userResponseStorageProvider, TelemetryClient telemetryClient) : base(telemetryClient) { this.logger = logger; this.userResponseStorageProvider = userResponseStorageProvider; }
/// <summary> /// Initializes a new instance of the <see cref="UserResponseSearchService"/> class. /// </summary> /// <param name="optionsAccessor">A set of key/value application configuration properties.</param> /// <param name="userResponseStorageProvider">User response storage provider dependency injection.</param> /// <param name="logger">Instance to send logs to the Application Insights service.</param> public UserResponseSearchService( IOptions <SearchServiceSetting> optionsAccessor, IUserResponseStorageProvider userResponseStorageProvider, ILogger <UserResponseSearchService> logger) { optionsAccessor = optionsAccessor ?? throw new ArgumentNullException(nameof(optionsAccessor)); this.options = optionsAccessor.Value; var searchServiceValue = this.options.SearchServiceName; this.searchServiceClient = new SearchServiceClient( searchServiceValue, new SearchCredentials(this.options.SearchServiceAdminApiKey)); this.searchIndexClient = new SearchIndexClient( searchServiceValue, UserResponseIndexName, new SearchCredentials(this.options.SearchServiceQueryApiKey)); this.searchIndexingIntervalInMinutes = Convert.ToInt32(this.options.SearchIndexingIntervalInMinutes, CultureInfo.InvariantCulture); this.initializeTask = new Lazy <Task>(() => this.InitializeAsync(this.options.ConnectionString)); this.userResponseStorageProvider = userResponseStorageProvider; this.logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="CannedResponsesActivityHandler"/> class. /// </summary> /// <param name="logger">Instance to send logs to the Application Insights service.</param> /// <param name="localizer">The current cultures' string localizer.</param> /// <param name="telemetryClient">The Application Insights telemetry client.</param> /// <param name="options">>A set of key/value application configuration properties for activity handler.</param> /// <param name="userResponseStorageProvider">User response storage provider to maintain data in Microsoft Azure table storage.</param> /// <param name="companyResponseStorageProvider">Company response storage provider to maintain data in Microsoft Azure table storage.</param> /// <param name="userResponseSearchService">The user response search service dependency injection.</param> /// <param name="companyResponseSearchService">The company response search service dependency injection.</param> /// <param name="userState">State management object for maintaining user conversation state.</param> /// <param name="microsoftAppCredentials">Microsoft application credentials to send card to the specified team.</param> /// <param name="tokenHelper">Generating custom JWT token and retrieving user detail from token.</param> /// <param name="botSetting">>A set of key/value application configuration properties for bot.</param> /// <param name="telemetrySettings">>Application insights settings.</param> /// <param name="userStorageHelper">User storage helper dependency injection.</param> /// <param name="companyStorageHelper">Company storage helper dependency injection.</param> /// <param name="messagingExtensionHelper">Messaging Extension helper dependency injection.</param> /// <param name="conversationStorageProvider">Conversation storage provider to maintain data in Microsoft Azure table storage.</param> public CannedResponsesActivityHandler( ILogger <CannedResponsesActivityHandler> logger, IStringLocalizer <Strings> localizer, TelemetryClient telemetryClient, IOptions <CannedResponsesActivityHandlerOptions> options, IUserResponseStorageProvider userResponseStorageProvider, ICompanyResponseStorageProvider companyResponseStorageProvider, IUserResponseSearchService userResponseSearchService, ICompanyResponseSearchService companyResponseSearchService, UserState userState, MicrosoftAppCredentials microsoftAppCredentials, ITokenHelper tokenHelper, IOptions <BotSetting> botSetting, IOptions <TelemetrySetting> telemetrySettings, IUserStorageHelper userStorageHelper, ICompanyStorageHelper companyStorageHelper, IMessagingExtensionHelper messagingExtensionHelper, IConversationStorageProvider conversationStorageProvider) { this.logger = logger; this.localizer = localizer; this.telemetryClient = telemetryClient; this.options = options; this.userResponseStorageProvider = userResponseStorageProvider; this.companyResponseStorageProvider = companyResponseStorageProvider; this.userResponseSearchService = userResponseSearchService; this.companyResponseSearchService = companyResponseSearchService; this.userState = userState; this.tokenHelper = tokenHelper; this.microsoftAppCredentials = microsoftAppCredentials; this.botSetting = botSetting; this.telemetrySettings = telemetrySettings; this.userStorageHelper = userStorageHelper; this.companyStorageHelper = companyStorageHelper; this.messagingExtensionHelper = messagingExtensionHelper; this.conversationStorageProvider = conversationStorageProvider; }