public HotelDialogSet (IStatePropertyAccessor <DialogState> dialogState, EchoBotAccessors accessors) : base(dialogState) { _accessors = accessors; var askNameDialogSet = new WaterfallStep[] { StartPromptName, ProcessPromptName, }; Add(new WaterfallDialog(askNameWaterfall, askNameDialogSet)); Add(new TextPrompt("textPrompt")); var waterfallSteps = new WaterfallStep[] { GetStartStayDateAsync, GetStayDayAsync, GetNumberOfOccupantAsync, GetBedSizeAsync, GetConfirmAsync, GetSummaryAsync, }; Add(new WaterfallDialog("bookRoom", waterfallSteps)); Add(new DateTimePrompt("dateTime")); Add(new NumberPrompt <int>("number")); Add(new ChoicePrompt("choice")); Add(new ConfirmPrompt("confirm")); var rootSteps = new WaterfallStep[] { StartRootAsync, ProcessRootAsync, LoopRootAsync, }; Add(new WaterfallDialog("root", rootSteps)); }
public EchoBot(EchoBotAccessors accessors, LuisRecognizer luis) { // The incoming luis variable is the LUIS Recognizer we added above. this.Recognizer = luis ?? throw new System.ArgumentNullException(nameof(luis)); // Set the _accessors _accessors = accessors ?? throw new System.ArgumentNullException(nameof(accessors)); // The DialogSet needs a DialogState accessor, it will call it when it has a turn context. _dialogs = new DialogSet(accessors.ConversationDialogState); // This array defines how the Waterfall will execute. var waterfallStepsWeather = new WaterfallStep[] { WeatherStepAsync, }; // Add named dialogs to the DialogSet. These names are saved in the dialog state. _dialogs.Add(new WaterfallDialog("details", waterfallStepsWeather)); _dialogs.Add(new TextPrompt("weather")); }