-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Senparc.Weixin.MP v9.3升级说明
JeffreySu edited this page Oct 7, 2014
·
12 revisions
Senparc.Weixin.MP v9.3 已经重写了部分MessageHandler相关代码,原先自定义一个CustomMessageContext的过程如下:
using Senparc.Weixin.Context;
using Senparc.Weixin.MP.Entities;
namespace Senparc.Weixin.MP.Sample.CommonService.CustomMessageHandler
{
public class CustomMessageContext : MessageContext
{
//...
}
}
现在因为IMessageHandler接口已经分离到Senparc.Weixin.dll中,所以需要确定MessageContext对应的IRequestMessageBase和IResponseMessageBase类型(MP和QY是不同的),因此需要加上泛型指定:
using Senparc.Weixin.Context;
using Senparc.Weixin.MP.Entities;
namespace Senparc.Weixin.MP.Sample.CommonService.CustomMessageHandler
{
public class CustomMessageContext : MessageContext<IRequestMessageBase,IResponseMessageBase>
{
//...
}
}