Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Namespace
- {
- public class Class()
- {
- public method()
- {
- List<CardImage> Images = new List<CardImage>();
- Images.Add(new CardImage(url: "http://dev.example.com/cat.png"));
- List<CardAction> Buttons = new List<CardAction>();
- Buttons.Add(new CardAction()
- {
- Value = $"http://google.com",
- Type = "openUrl",
- Title = "Google"
- });
- ThumbnailCard Card = new ThumbnailCard()
- {
- Title = "Another Card!",
- Subtitle = "Another test card",
- Text = "This is just like a hero card, but smaller picture.",
- Images = Images,
- Buttons = Buttons
- };
- try
- {
- PostJsonAsync(MSTeamsCards.Config.WebHook, card.ConvertToJsonSomehow()).ContinueWith(x =>
- {
- try
- {
- Console.Write(x.Result);
- } catch(Exception e)
- {
- Console.WriteLine(e.Message);
- }
- });
- } catch(Exception e)
- {
- Console.WriteLine(e.Message);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement