本文整理汇总了C#中WeiXin.Model.SendMsg.SendText类的典型用法代码示例。如果您正苦于以下问题:C# SendText类的具体用法?C# SendText怎么用?C# SendText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SendText类属于WeiXin.Model.SendMsg命名空间,在下文中一共展示了SendText类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProduceImage
private static void ProduceImage(Dictionary<string, string> model)
{
SendText text = new SendText();
text.ToUserName = model.ReadKey(PublicField.FromUserName);
text.FromUserName = model.ReadKey(PublicField.ToUserName);
text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
text.MsgType = "image";
}
示例2: ProduceNews
/// <summary>
/// 生成图文消息
/// </summary>
/// <param name="model">The model.</param>
/// <param name="content">The content.</param>
/// Author : 俞立钢
/// Company : 绍兴标点电子技术有限公司
/// Created : 2014-10-24 09:57:37
private static void ProduceNews(Dictionary<string, string> model, string content)
{
SendText text = new SendText();
text.ToUserName = model.ReadKey(PublicField.FromUserName);
text.FromUserName = model.ReadKey(PublicField.ToUserName);
text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
text.MsgType = "text";
text.Content = content;
}
示例3: ProduceText
/// <summary>
/// 生成文本函数
/// </summary>
/// <param name="model">The model.</param>
/// <param name="content">The content.</param>
/// Author : 俞立钢
/// Company : 绍兴标点电子技术有限公司
/// Created : 2014-10-17 14:46:20
private static void ProduceText(Dictionary<string, string> model, string content)
{
SendText text = new SendText();
text.ToUserName = model.ReadKey(PublicField.FromUserName);
text.FromUserName = model.ReadKey(PublicField.ToUserName);
text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
text.MsgType = "text";
text.Content = content;
OperateXml.ResponseEnd(Templete.SendText(text));
}
示例4: SendText
/// <summary>
/// 回复文本消息
/// </summary>
/// <param name="model">The model.</param>
/// Author : 俞立钢
/// Company : 绍兴标点电子技术有限公司
/// Created : 2014-10-10 11:00:22
public static string SendText(SendText model)
{
return string.Format(@"<xml><ToUserName><![CDATA[{0}]]></ToUserName><FromUserName><![CDATA[{1}]]></FromUserName><CreateTime>{2}</CreateTime><MsgType><![CDATA[{3}]]></MsgType><Content><![CDATA[{4}]]></Content></xml>", model.ToUserName, model.FromUserName, model.CreateTime, model.MsgType, model.Content);
}