Пример #1
0
        public void ProcessRequest(HttpContext context)
        {
            using (QueryContainer qc = new QueryContainer())
            {
                string query = context.Request["q"];
                string type  = context.Request["type"];

                string[] lots;
                switch (type)
                {
                case "active":
                    lots = qc.GetActiveContainerNames(query);
                    break;

                case "hold":
                    lots = qc.GetHoldContainerNames(query);
                    break;

                case "all":
                default:
                    lots = qc.GetAllContainerNames(query);
                    break;
                }
                context.Response.ContentType = "text/plain";
                context.Response.Write(QueryContainer.GetStringWithNewLine(lots));
            }
        }
Пример #2
0
        public void ProcessRequest(HttpContext context)
        {
            using (QueryResource q = new QueryResource())
            {
                string query = context.Request["q"];
                string type  = context.Request["type"];

                string[] resources;
                switch (type)
                {
                case "all":
                default:
                    resources = q.GetAllResourceNames(query);
                    break;
                }
                context.Response.ContentType = "text/plain";
                context.Response.Write(QueryContainer.GetStringWithNewLine(resources));
            }
        }