protected void Page_Load(object sender, EventArgs e) { //开始执行 if (Request["state"] != null && Request["state"] == "wx") { HandlerController.Singleton.Execute(()=> { var contentInfo = new WxContentInfo(); if (Request["code"] != null) { contentInfo.Code = Request["code"]; contentInfo.Response = Response; } return contentInfo; }); } if (Request["state"] != null && Request["state"] == "sina") { HandlerController.Singleton.Execute(() => { var contentInfo = new SinaContentInfo(); if (Request["code"] != null) { contentInfo.Code = Request["code"]; contentInfo.Response = Response; } return contentInfo; }); } if (Request["is_success"] != null) { HandlerController.Singleton.Execute(() => { var contentInfo = new AliContentInfo(Request); return contentInfo; }); } if (Request["state"] != null && Request["state"] == "qzone") { HandlerController.Singleton.Execute(() => { var contentInfo = new QzoneContentInfo(); if (Request["code"] != null) { contentInfo.Code = Request["code"]; contentInfo.Response = Response; } return contentInfo; }); } }
protected void Page_Load(object sender, EventArgs e) { //开始执行 if (Request["state"] != null && Request["state"] == "wx") { HandlerController.Singleton.Execute(() => { var contentInfo = new WxContentInfo(); if (Request["code"] != null) { contentInfo.Code = Request["code"]; contentInfo.Response = Response; } return(contentInfo); }); } if (Request["state"] != null && Request["state"] == "sina") { HandlerController.Singleton.Execute(() => { var contentInfo = new SinaContentInfo(); if (Request["code"] != null) { contentInfo.Code = Request["code"]; contentInfo.Response = Response; } return(contentInfo); }); } if (Request["is_success"] != null) { HandlerController.Singleton.Execute(() => { var contentInfo = new AliContentInfo(Request); return(contentInfo); }); } if (Request["state"] != null && Request["state"] == "qzone") { HandlerController.Singleton.Execute(() => { var contentInfo = new QzoneContentInfo(); if (Request["code"] != null) { contentInfo.Code = Request["code"]; contentInfo.Response = Response; } return(contentInfo); }); } }
public void WxOAuthHandler() { //每个交互处理器必须首先注册到处理器控制器中 HandlerController.Singleton.RegisterHandler(new WxOAuthHandler()); //开始执行 HandlerController.Singleton.Execute(() => { var context = new WxContentInfo(); return context; }); }
public void WxOAuthHandler() { //每个交互处理器必须首先注册到处理器控制器中 HandlerController.Singleton.RegisterHandler(new WxOAuthHandler()); //开始执行 HandlerController.Singleton.Execute(() => { var context = new WxContentInfo(); return(context); }); }