/// <summary> /// Initializes a new instance of the <see cref="TaskModuleActivity"/> class. /// </summary> /// <param name="configurationProvider">Configuration Provider.</param> /// <param name="qnaServiceProvider">QnA service provider.</param> /// <param name="logger">Instance to send logs to the Application Insights service.</param> /// <param name="qnaPairServiceFacade">Instance of QnA pair service class to call add/update/get QnA pair.</param> public TaskModuleActivity( Common.Providers.IConfigurationDataProvider configurationProvider, IQnaServiceProvider qnaServiceProvider, ILogger <TaskModuleActivity> logger, IQnAPairServiceFacade qnaPairServiceFacade) { this.configurationProvider = configurationProvider ?? throw new ArgumentNullException(nameof(configurationProvider)); this.qnaServiceProvider = qnaServiceProvider ?? throw new ArgumentNullException(nameof(qnaServiceProvider)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.qnaPairServiceFacade = qnaPairServiceFacade ?? throw new ArgumentNullException(nameof(qnaPairServiceFacade)); }
/// <summary> /// Initializes a new instance of the <see cref="ConversationService"/> class. /// </summary> /// <param name="configurationProvider">Configuration Provider.</param> /// <param name="logger">Instance to send logs to the Application Insights service.</param> /// <param name="qnaPairServiceFacade">Instance of QnA pair service class to call add/update/get QnA pair.</param> /// <param name="ticketsProvider">Instance of Ticket provider helps in fetching and storing information in storage table.</param> /// <param name="notificationService">Notifies in expert's Team chat.</param> public ConversationService( Common.Providers.IConfigurationDataProvider configurationProvider, IQnAPairServiceFacade qnaPairServiceFacade, ITicketsProvider ticketsProvider, INotificationService notificationService, ILogger <ConversationService> logger) { this.configurationProvider = configurationProvider ?? throw new ArgumentNullException(nameof(configurationProvider)); this.ticketsProvider = ticketsProvider ?? throw new ArgumentNullException(nameof(ticketsProvider)); this.notificationService = notificationService ?? throw new ArgumentNullException(nameof(notificationService)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.qnaPairServiceFacade = qnaPairServiceFacade ?? throw new ArgumentNullException(nameof(qnaPairServiceFacade)); }
/// <summary> /// Initializes a new instance of the <see cref="BotCommandResolver"/> class. /// </summary> /// <param name="configurationProvider">Configuration Provider.</param> /// <param name="activityStorageProvider">Activity storage provider.</param> /// <param name="qnaServiceProvider">QnA service provider.</param> /// <param name="logger">Instance to send logs to the Application Insights service.</param> /// <param name="qnaPairService">Instance of QnA pair service class to call add/update/get QnA pair.</param> /// <param name="botSettings">Represents a set of key/value application configuration properties for FaqPlusPlus bot.</param> /// <param name="conversationService">Conversation service to send adaptive card in personal and teams chat.</param> public BotCommandResolver( Common.Providers.IConfigurationDataProvider configurationProvider, IQnaServiceProvider qnaServiceProvider, IActivityStorageProvider activityStorageProvider, IQnAPairServiceFacade qnaPairService, IOptionsMonitor <BotSettings> botSettings, ILogger <BotCommandResolver> logger, IConversationService conversationService) { this.configurationProvider = configurationProvider ?? throw new ArgumentNullException(nameof(configurationProvider)); this.qnaServiceProvider = qnaServiceProvider ?? throw new ArgumentNullException(nameof(qnaServiceProvider)); this.activityStorageProvider = activityStorageProvider ?? throw new ArgumentNullException(nameof(activityStorageProvider)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.qnaPairService = qnaPairService ?? throw new ArgumentNullException(nameof(qnaPairService)); this.conversationService = conversationService ?? throw new ArgumentNullException(nameof(conversationService)); if (botSettings == null) { throw new ArgumentNullException(nameof(botSettings)); } var options = botSettings.CurrentValue; this.appBaseUri = options.AppBaseUri; }