Ejemplo n.º 1
0
        protected void HandleGET(
            IHttpRequest httpReq,
            IHttpResponse httpResp)
        {
            HtmlTextWriter wrtr = new HtmlTextWriter(httpResp.Output);

            XmlRpcDocWriter.WriteDoc(wrtr, this.GetType());
            httpResp.StatusCode = 200;
        }
Ejemplo n.º 2
0
        protected void HandleGET(
            IHttpResponse httpResp,
            bool autoDocVersion)
        {
            using (var stm = new MemoryStream())
                using (var wrtr = new HtmlTextWriter(new StreamWriter(stm)))
                {
                    XmlRpcDocWriter.WriteDoc(wrtr, GetType(), autoDocVersion);
                    wrtr.Flush();

                    httpResp.ContentType = "text/html";
                    httpResp.StatusCode  = 200;
                    if (!httpResp.SendChunked)
                    {
                        httpResp.ContentLength = stm.Length;
                    }

                    stm.Position = 0;
                    Stream respStm = httpResp.OutputStream;
                    Util.CopyStream(stm, respStm);
                    respStm.Flush();
                }
        }