Beispiel #1
0
 /// <summary>
 /// Adding a ImageBlock for chatbot.
 /// </summary>
 /// <param name="imgUrl"></param>
 /// <returns></returns>
 public ChatBotClient AddImageBlock(string imgUrl)
 {
     MessageBlocks.Add(new Dictionary <string, object>
     {
         { "image", imgUrl }
     });
     return(this);
 }
Beispiel #2
0
 /// <summary>
 /// Adding a HorizontalListBlock for chatbot
 /// </summary>
 /// <param name="elements"></param>
 /// <returns></returns>
 public ChatBotClient AddHorizontalListBlock(List <ChatBotElement> elements, string image_aspect_ratio)
 {
     MessageBlocks.Add(new Dictionary <string, object>
     {
         { "cards", new { elements, image_aspect_ratio } }
     });
     return(this);
 }
Beispiel #3
0
 /// <summary>
 /// Adding a TextBlock for chatbot.
 /// </summary>
 /// <param name="text"></param>
 /// <returns></returns>
 public ChatBotClient AddTextBlock(string text)
 {
     MessageBlocks.Add(new Dictionary <string, object>
     {
         { "text", text }
     });
     return(this);
 }
Beispiel #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="text"></param>
 /// <param name="foreground"></param>
 /// <param name="background"></param>
 public void AppendText(string text, TextColor foreground, TextColor background)
 {
     MessageBlocks.Add(new TextMessageBlock(text, foreground, background));
     UpdateInnerText();
 }
Beispiel #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="text"></param>
 public void AppendText(string text)
 {
     MessageBlocks.Add(new TextMessageBlock(text));
     UpdateInnerText();
 }