예제 #1
0
        public async Task Do(LoggerBotContext context)
        {
            var logCategories = context.GetUserState <LoggerBotUserState>().FollowedLogCategories;

            var buttons = logCategories.Select(category =>
            {
                return(new CardAction()
                {
                    Type = ActionTypes.ImBack,
                    Title = category,
                    DisplayText = "Log " + category,
                    Text = "Text Log " + category,
                    Value = "Log " + category
                });
            }).ToList();

            var response = context.Activity.CreateReply();

            var attachment = new ThumbnailCard()
            {
                Title    = "",
                Subtitle = "",
                Text     = "",
                Buttons  = buttons
            }.ToAttachment();

            response.Attachments = new List <Attachment>()
            {
                attachment
            };

            await context.SendActivity(response);
        }
예제 #2
0
        public async Task Do(LoggerBotContext context)
        {
            var response = context.Activity.CreateReply();

            var attachment = this.Card2();

            response.Attachments = new List <Attachment>()
            {
                attachment
            };

            await context.SendActivity(response);
        }
예제 #3
0
        public async Task Do(LoggerBotContext context)
        {
            ////await context.SendActivity("Hello! (From HelloAction)");

            var response = "";

            foreach (var category in context.LogCategories)
            {
                response += category.Name + "\n";
            }

            await context.SendActivity(response);
        }
예제 #4
0
 public async Task Do(LoggerBotContext context)
 {
     await context.SendActivity("Sorry, I didn't understand.");
 }