/*
第三方平台appid
1413192760
authorized
公众号appid
授权码(code)
过期时间
*/
using System;
using System.Xml.Linq;
namespace Hncore.Wx.Open
{
///
/// 授权成功通知
///
public class MessageAuthorized : MessageOpenBase
{
public MessageAuthorized(XDocument doc) : base(doc)
{
this.AuthorizerAppid = doc.Root.Element("AuthorizerAppid").Value;
this.AuthorizationCode = doc.Root.Element("AuthorizationCode").Value;
this.AuthorizationCodeExpiredTime = DateTimeOffset.Parse(doc.Root.Element("AuthorizationCodeExpiredTime").Value);
}
public override RequestInfoType InfoType
{
get { return RequestInfoType.authorized; }
}
///
/// 公众号appid
///
public string AuthorizerAppid { get; set; }
///
/// 授权码(code)
///
public string AuthorizationCode { get; set; }
///
/// 过期时间
///
public DateTimeOffset AuthorizationCodeExpiredTime { get; set; }
}
}