Ejemplo n.º 1
0
#pragma warning disable CS0618
        public static Attachment ToAttachment(this KeyboardCard keyboard)
        {
            return(new Attachment
            {
                ContentType = KeyboardCard.ContentType,
                Content = keyboard
            });
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Maps a <see cref="KeyboardCard"/> to a <see cref="FacebookMessage"/>
 /// </summary>
 /// <param name="keyboard"> The keyboard card.</param>
 public static FacebookMessage ToFacebookMessage(this KeyboardCard keyboard)
 {
     return(new FacebookMessage(text: keyboard.Text, quickReplies: keyboard.Buttons.Select(b => b.ToFacebookQuickReply()).ToList()));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Maps a <see cref="KeyboardCard"/> to a <see cref="HeroCard"/>
 /// </summary>
 /// <param name="keyboard"> The keyboard card.</param>
 public static HeroCard ToHeroCard(this KeyboardCard keyboard)
 {
     return(new HeroCard(text: keyboard.Text, buttons: keyboard.Buttons));
 }