Exemplo n.º 1
0
        public void GetMessageInfo(System.Web.HttpContext context)
        {
            string      text        = "{\"status\":\"0\"}";
            MessageInfo messageInfo = WeiboHelper.GetMessageInfo(int.Parse(context.Request["MessageId"]));

            if (messageInfo != null)
            {
                text = "{\"status\":\"1\",";
                text = text + "\"SenderMessage\":\"" + Globals.String2Json(messageInfo.SenderMessage) + "\",";
                text = text + "\"DisplayName\":\"" + Globals.String2Json(messageInfo.DisplayName) + "\",";
                text = text + "\"Summary\":\"" + Globals.String2Json(messageInfo.Summary) + "\",";
                text = text + "\"Image\":\"" + messageInfo.Image + "\",";
                text = text + "\"Url\":\"" + messageInfo.Url + "\",";
                object obj = text;
                text = string.Concat(new object[]
                {
                    obj,
                    "\"ArticleId\":\"",
                    messageInfo.ArticleId,
                    "\""
                });
                text += "}";
            }
            context.Response.Write(text);
        }
Exemplo n.º 2
0
        public void GetMessageInfo(HttpContext context)
        {
            string      s           = "{\"status\":\"0\"}";
            MessageInfo messageInfo = WeiboHelper.GetMessageInfo(int.Parse(context.Request["MessageId"]));

            if (messageInfo != null)
            {
                s = "{\"status\":\"1\",";
                object obj2 = ((((s + "\"SenderMessage\":\"" + messageInfo.SenderMessage + "\",") + "\"DisplayName\":\"" + messageInfo.DisplayName + "\",") + "\"Summary\":\"" + messageInfo.Summary + "\",") + "\"Image\":\"" + messageInfo.Image + "\",") + "\"Url\":\"" + messageInfo.Url + "\",";
                s = string.Concat(new object[] { obj2, "\"ArticleId\":\"", messageInfo.ArticleId, "\"" }) + "}";
            }
            context.Response.Write(s);
        }