Td.Weixin.Public/Message/ReceiveMessage.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*******************************
* Author: Dong [mailto:techdong@hotmail.com] 欢迎交流 Q群:289147891
* Date: 2013-09-04 14:36:48
* Desc:
*
*******************************/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Dynamic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Web;
using System.Xml.Linq;
namespace Td.Weixin.Public.Message
{
/// <summary>
/// 接收的消息
/// </summary>
public class ReceiveMessage : Message
{
/// <summary>
/// 消息id
/// </summary>
[Output]
public long MsgId { get; set; }
#region 静态方法
/// <summary>
/// 从xml文件解析消息。
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
public static ReceiveMessage Parse(string text)
{
var ret = ObtainByType(text);
ret.ParseFrom(text);
return ret;
}
/// <summary>
/// 从HttpContext中获取信息并解析
/// </summary>
/// <returns></returns>
public static ReceiveMessage ParseFromContext()
{
var request = HttpContext.Current.Request;
var sr = new StreamReader(request.InputStream);
var msg = Parse(sr.ReadToEnd());
return msg;
}
后面还有 117 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。