microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.Cards/Actions/MessageBackAction.cs
34lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using Microsoft.Teams.Common; |
| 5 | |
| 6 | namespace Microsoft.Teams.Cards; |
| 7 | |
| 8 | public class MessageBackAction : SubmitAction |
| 9 | { |
| 10 | public MessageBackAction(string text, string value) |
| 11 | { |
| 12 | Data = new Union<string, SubmitActionData>(new SubmitActionData |
| 13 | { |
| 14 | MsTeams = new MessageBackSubmitActionData() |
| 15 | { |
| 16 | Text = text, |
| 17 | Value = value |
| 18 | } |
| 19 | }); |
| 20 | } |
| 21 | |
| 22 | public MessageBackAction(string text, string displayText, string value) |
| 23 | { |
| 24 | Data = new Union<string, SubmitActionData>(new SubmitActionData |
| 25 | { |
| 26 | MsTeams = new MessageBackSubmitActionData() |
| 27 | { |
| 28 | Text = text, |
| 29 | DisplayText = displayText, |
| 30 | Value = value |
| 31 | } |
| 32 | }); |
| 33 | } |
| 34 | } |