using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Text; namespace Tianyi.DingtalkRobotKit { public class FeedCardMessage : MessageBase { public FeedCardMessage(FeedCardOption option) : base() { this.feedCard = option; } public FeedCardMessage(FeedCardOption option, at linkAt) : base() { this.feedCard = option; this.at = linkAt; } public FeedCardOption feedCard { get; set; } /// /// 消息类型 /// public override string msgtype { get => "feedCard"; } /// /// 转换为json字符串 /// public override string ToJson() { var meaasge = new { msgtype = this.msgtype, feedCard = this.feedCard, at = this.at }; string messageJson = JsonConvert.SerializeObject(meaasge); return messageJson; } } }