Exemplo n.º 1
0
    public RoomBookingDialog(HotelRecognizer recognizer, ILogger <RoomBookingDialog> logger)
        : base(nameof(RoomBookingDialog))
    {
        _recognizer = recognizer;
        _logger     = logger;

        //Add the needed prompts and other dialog steps
        AddDialog(new TextPrompt(nameof(TextPrompt)));
        AddDialog(new NumberPrompt <int>("IntPrompt"));
        AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt)));
        AddDialog(new ChoicePrompt(nameof(ChoicePrompt)));
        //Add custom Dialogs for special handlings
        AddDialog(new DateResolverDialog());
        AddDialog(new BreakfastDialog());
        //Create the main Dialog
        AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
        {
            NumberOfGuestStepAsync,
            NumberOfChildrenStepAsync,
            BreakfastStepAsync,
            ArrivalDateStepAsync,
            NumberOfNightsStepAsync,
            PaymentMethodStepAsync,
            ParkingLotRequiredStepAsync,
            PillowTypeStepAsync,
            AllergiesStepAsync,
            AgeVerificationStepAsync,
            ConfirmStepAsync,
            FinalStepAsync
        }));

        // The initial child Dialog to run.
        InitialDialogId = nameof(WaterfallDialog);
    }
Exemplo n.º 2
0
        public MainDialog(HotelRecognizer recognizer, RoomBookingDialog bookingDialog, ILogger <MainDialog> logger) : base(nameof(MainDialog))
        {
            _recognizer = recognizer;
            Logger      = logger;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(bookingDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                ActStepAsync,
                //FinalStepAsync,
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }