Esempio n. 1
0
        public async Task <DialogTurnResult> AskForLocation(WaterfallStepContext sc, CancellationToken cancellationToken)
        {
            _state = await _accessor.GetAsync(sc.Context);

            _state.Name = (string)sc.Result;

            return(await sc.PromptAsync(LocationPrompt, new PromptOptions()
            {
                Prompt = await _responder.RenderTemplate(sc.Context, "en", OnboardingResponses._locationPrompt, new { _state.Name }),
            }));
        }
Esempio n. 2
0
        public async Task <DialogTurnResult> FinishOnboardingDialog(WaterfallStepContext sc, CancellationToken cancellationToken)
        {
            _state = await _accessor.GetAsync(sc.Context, () => new OnboardingState());

            _state.Location = (string)sc.Result;

            await _responder.ReplyWith(sc.Context, OnboardingResponses._haveLocation, new { _state.Location });

            await _responder.ReplyWith(sc.Context, OnboardingResponses._linkedAccountsInfo);

            return(await sc.EndDialogAsync());
        }