示例#1
0
        public virtual void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            coding       = CreateCoding(context);
            ReadContext  = CreateReadContext(context);
            WriteContext = CreateWriteContext(context);
            string type = context.Request.QueryString["t"];

            if (context.Request.RequestType.ToLower() == "post")
            {
                try
                {
                    Dictionary <string, object> kv = ReadContext.ToDictionary();
                    string str = ProcessRequestPostHandler(type, kv);
                    Write(context, str);
                }
                catch (Exception ex)
                {
                    Log.writeLog("ProcessRequest", ex.ToString(), type);
                }
            }
            else
            {
                string str = ProcessRequestGetHandler(type);
                Write(context, str);
            }
        }
示例#2
0
 public WebHelper(IReadContext ReadContext)
 {
     this.ReadContext = ReadContext;
     kv = ReadContext.ToDictionary();
 }