private async Task ProductSelectionReceivedAsync(IDialogContext context, IAwaitable <Product> result) { var product = await result; BotStateRepository.AddProductToBasket(context, product); context.Done(MessageBag.Of(product, MessageType.ProductOrder)); }
private async Task DisplayActionsCard(IDialogContext context) { Attachment attachment = new Attachment { ContentType = AdaptiveCard.ContentType, Content = CardFactory.GetProductActionsCard(BotStateRepository.GetAllProducts(context)) }; var reply = context.MakeMessage(); reply.Attachments.Add(attachment); await context.PostAsync(reply, CancellationToken.None); }
public List <string> Remove(IDialogContext context) { BotStateRepository.RemoveProductsFromBasket(context, _productsToRemove); return(_productsToRemove); }