示例#1
0
        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;
                });
            }
        }
示例#2
0
        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);
                });
            }
        }
示例#3
0
        public void WxOAuthHandler()
        {
            //每个交互处理器必须首先注册到处理器控制器中
            HandlerController.Singleton.RegisterHandler(new WxOAuthHandler());

            //开始执行
            HandlerController.Singleton.Execute(() =>
            {
                var context = new WxContentInfo();
                return context;
            });
        }
示例#4
0
        public void WxOAuthHandler()
        {
            //每个交互处理器必须首先注册到处理器控制器中
            HandlerController.Singleton.RegisterHandler(new WxOAuthHandler());

            //开始执行
            HandlerController.Singleton.Execute(() =>
            {
                var context = new WxContentInfo();
                return(context);
            });
        }