public WechatHandler(IHttpContextAccessor httpContextAccessor, IWechatContext wechatContext) { this.httpContext = httpContextAccessor; this.wechatContext = wechatContext; //this.httpClientFactory = httpClientFactory; this.wechat = new WechatModel(); this.wechatContext.WechatModel = this.wechat; }
public MessageBase Hanlde(IWechatContext wechatContext) { if (wechatContext == null) { throw new ArgumentNullException("wechatContext"); } var kernelContext = new KernelContext(wechatContext, Setting, _handlerCollection); var dispatcher = TypeResolver.Resolve <IDispatcher>(); var handler = dispatcher.Dispatching(kernelContext); return(handler.Process()); }
internal KernelContext(IWechatContext wechatContext, KernelSetting setting, HandlerCollection handlerCollection) { if (wechatContext == null) { throw new ArgumentNullException("wechatContext"); } if (setting == null) { throw new ArgumentNullException("setting"); } if (handlerCollection == null) { throw new ArgumentNullException("handlerCollection"); } WechatContext = wechatContext; Setting = setting; MessageHandlers = new ReadOnlyCollection <IMessageHandler>(handlerCollection); RawBody = wechatContext.RawBody; }
public MessageBase VerifyAvailability(IWechatContext wechatContext) { throw new NotImplementedException(); }
public CustomMenu(IWechatContext wechatContext) { this.WechatContext = wechatContext; }