Exemplo n.º 1
0
        void IHttpHandler.ProcessRequest(HttpContext context)
        {
            _context = context;

            // create the channel
            _channel = new RssChannelType();
            _channel.SetDefaults();

            // parse the channel name and the user name from the query string
            string userName;
            string channelName;

            RssHttpHandlerHelper.ParseChannelQueryString(context.Request, out channelName, out userName);

            // populate items (call the derived class)
            PopulateChannel(channelName, userName);

            // save XML into response
            XmlDocument doc = _channel.SaveAsXml();

            context.Response.ContentType = "text/xml";
            doc.Save(context.Response.OutputStream);
        }