예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NewReservationDialog"/> class.
        /// </summary>
        /// <param name="stateAccessor">The <see cref="ConversationState"/> for storing properties at conversation-scope.</param>
        public NewReservationDialog(IStatePropertyAccessor <NewReservationState> stateAccessor) : base(nameof(NewReservationDialog))
        {
            _stateAccessor   = stateAccessor ?? throw new ArgumentNullException(nameof(stateAccessor));
            _telemetryClient = new TelemetryClient();

            var dialogSteps = new WaterfallStep[]
            {
                InitializeStateStepAsync,
                // PromptUsualStepAsync, // Can I start your usual order?
                PromptForServicesStepAsync,
                RecommendSlotsStepAsync,
                PromptForDateStepAsync,
                PromptForSlotStepAsync,
                PromptForVehiclePlateNumberConfirmationStepAsync,
                PromptForVehiclePlateNumberStepAsync,
                PromptForPrivateStepAsync,
                PromptForCommentStepAsync,
                DisplayReservationStepAsync,
            };

            AddDialog(new WaterfallDialog(Name, dialogSteps));
            AddDialog(AuthDialog.LoginPromptDialog());
            AddDialog(new FindReservationDialog());

            AddDialog(new TextPrompt(ServicesPromptName, ValidateServices));
            AddDialog(new ChoicePrompt(RecommendedSlotsPromptName, ValidateRecommendedSlots));
            AddDialog(new DateTimePrompt(DatePromptName, ValidateDate));
            AddDialog(new ChoicePrompt(SlotPromptName));
            AddDialog(new ConfirmPrompt(VehiclePlateNumberConfirmationPromptName));
            AddDialog(new TextPrompt(VehiclePlateNumberPromptName, ValidateVehiclePlateNumber));
            AddDialog(new ConfirmPrompt(PrivatePromptName));
            AddDialog(new TextPrompt(CommentPromptName));
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CancelReservationDialog"/> class.
        /// </summary>
        /// <param name="stateAccessor">The <see cref="ConversationState"/> for storing properties at conversation-scope.</param>
        /// <param name="telemetryClient">Telemetry client.</param>
        public CancelReservationDialog(IStatePropertyAccessor <CancelReservationState> stateAccessor, TelemetryClient telemetryClient) : base(nameof(CancelReservationDialog))
        {
            _stateAccessor   = stateAccessor ?? throw new ArgumentNullException(nameof(stateAccessor));
            _telemetryClient = telemetryClient;

            var dialogSteps = new WaterfallStep[]
            {
                InitializeStateStepAsync,
                SelectReservationStepAsync,
                PromptForConfirmationStepAsync,
                DisplayCancellationConfirmationStepAsync,
            };

            AddDialog(new WaterfallDialog(Name, dialogSteps));
            AddDialog(AuthDialog.LoginPromptDialog());
            AddDialog(new FindReservationDialog(telemetryClient));

            AddDialog(new ConfirmPrompt(ConfirmationPromptName));
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ConfirmDropoffDialog"/> class.
        /// </summary>
        /// <param name="stateAccessor">The <see cref="ConversationState"/> for storing properties at conversation-scope.</param>
        /// <param name="telemetryClient">Telemetry client.</param>
        public ConfirmDropoffDialog(IStatePropertyAccessor <ConfirmDropoffState> stateAccessor, TelemetryClient telemetryClient) : base(nameof(ConfirmDropoffDialog))
        {
            _stateAccessor   = stateAccessor ?? throw new ArgumentNullException(nameof(stateAccessor));
            _telemetryClient = telemetryClient;

            var dialogSteps = new WaterfallStep[]
            {
                InitializeStateStepAsync,
                SelectReservationStepAsync,
                PromptForBuildingStepAsync,
                PromptForFloorStepAsync,
                PromptForSeatStepAsync,
                DisplayDropoffConfirmationStepAsync,
            };

            AddDialog(new WaterfallDialog(Name, dialogSteps));
            AddDialog(AuthDialog.LoginPromptDialog());
            AddDialog(new FindReservationDialog(telemetryClient));

            AddDialog(new ChoicePrompt(BuildingPromptName));
            AddDialog(new ChoicePrompt(FloorPromptName));
            AddDialog(new TextPrompt(SeatPromptName, ValidateSeat));
        }