private async Task <DialogTurnResult> BusInfoStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) { busDetail.StationName = busDetail.StationName == null?stepContext.Context.Activity.Text : stepContext.Result.ToString(); string msg = await BusInformation.GetBusArrTimeAsync(busDetail.RouteNum, busDetail.StationName); await stepContext.Context.SendActivityAsync(MessageFactory.Text(msg), cancellationToken); return(await stepContext.EndDialogAsync(null, cancellationToken)); }
private async Task <DialogTurnResult> BusInfoStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) { busDetail.StationName = busDetail.StationName == null?stepContext.Context.Activity.Text : stepContext.Result.ToString(); (string arrmsg1, string arrmsg2) = await BusInformation.GetBusArrTimeAsync(busDetail.RouteNum, busDetail.StationName); CardGenerator cardGenerator = new CardGenerator(); await cardGenerator.AttachBusCardAsync(stepContext.Context, busDetail, arrmsg1, arrmsg2, cancellationToken); return(await stepContext.EndDialogAsync(null, cancellationToken)); }