예제 #1
0
 public static IResponse Get(string transferMode, ContextSupport context)
 {
     if (string.IsNullOrEmpty(transferMode) || transferMode == "scriptTag") {
         return new JsonRespose(context);
     } else if (transferMode == "iframe") {
         return new JsonRespose(context, true);
     } else {
         return new NullResponse();
     }
 }
예제 #2
0
 public void ProcessRequest(HttpContext context)
 {
     ContextSupport cs = new ContextSupport(context);
     try {
         cs.ProcessRequest();
         cs.Response.WriteResult();
         cs.CompleteRequest();
     } catch {
         throw new HttpException(500, "服务端异常");
     }
 }
예제 #3
0
파일: JsonRespose.cs 프로젝트: yorkart/NDWR
        public JsonRespose(ContextSupport context, bool isIframe)
        {
            this.Context = context;

            this.isIframe = isIframe;
            if (isIframe) {
                prefixScriptNode = "<script type=\"text/javascript\">\r\n";
                suffixScriptNode = "\r\n</script>";
                ndwrVariableHost = "window.parent.";
                contentType = "text/html";
            }
        }
예제 #4
0
파일: JsonRespose.cs 프로젝트: yorkart/NDWR
 public JsonRespose(ContextSupport context)
 {
     this.Context = context;
 }