public BotAppBot(BotAccessor accessor, ILuisRouterService luisRouterService, IQnAMakerService qnaMakerService, IActiveDirectoryService activeDirectoryService, ConversationState conversationState, UserState userState, ILogger <BotAppBot> logger) { this.accessor = accessor; this.conversationState = conversationState; this.userState = userState; this.logger = logger; this.luisRouterService = luisRouterService; this.qnaMakerService = qnaMakerService; this.activeDirectoryService = activeDirectoryService; this.dialogs = new DialogSet(accessor.ConversationDialogState); this.dialogs.Add(new MainDialog(accessor, luisRouterService, qnaMakerService)); this.dialogs.Add(new LuisQnADialog(accessor, luisRouterService, qnaMakerService)); }
public MainDialog(BotAccessor accessor, ILuisRouterService luisRouterService, IQnAMakerService qnaMakerService) : base(nameof(MainDialog)) { this.accessor = accessor ?? throw new ArgumentNullException(nameof(accessor)); this.luisRouterService = luisRouterService ?? throw new ArgumentNullException(nameof(luisRouterService)); this.qnaMakerService = qnaMakerService ?? throw new ArgumentNullException(nameof(qnaMakerService)); AddDialog(new WaterfallDialog(nameof(MainDialog), new WaterfallStep[] { LaunchLuisQnADialog, EndMainDialog })); AddDialog(new LuisQnADialog(accessor, luisRouterService, qnaMakerService)); }
public LuisQnADialog(BotAccessor accessor, ILuisRouterService luisRouterService, IQnAMakerService qnaMakerService) : base(nameof(LuisQnADialog)) { this.accessor = accessor ?? throw new ArgumentNullException(nameof(accessor)); this.luisRouterService = luisRouterService ?? throw new ArgumentNullException(nameof(luisRouterService)); this.qnaMakerService = qnaMakerService ?? throw new ArgumentNullException(nameof(qnaMakerService)); AddDialog(new WaterfallDialog(nameof(LuisQnADialog), new WaterfallStep[] { AskQuestionDialog, ProcessQuestionDialog, ProcessIfExampleIsRequiredDialog, EndDialog })); AddDialog(new TextPrompt("QuestionValidator", QuestionValidator)); AddDialog(new ChoicePrompt("AskForExampleValidator", AskForExampleValidator) { Style = ListStyle.List }); }