private GBaseFeed Parse(String xml)
        {
            byte[]    bytes = new UTF8Encoding().GetBytes(xml);
            GBaseFeed feed  = new GBaseFeed(FeedUri, new GBaseService("Test", "boguskey"));

            feed.Parse(new MemoryStream(bytes), AlternativeFormat.Atom);
            return(feed);
        }
Ejemplo n.º 2
0
        //////////////////////////////////////////////////////////////////////
        /// <summary>Reads a feed or entry from stdin.</summary>
        //////////////////////////////////////////////////////////////////////
        protected GBaseFeed ReadFromStandardInput()
        {
            GBaseFeed feed  = new GBaseFeed(uriFactory.ItemsFeedUri, service);
            Stream    stdin = Console.OpenStandardInput();

            try
            {
                feed.Parse(stdin, AlternativeFormat.Atom);
                return(feed);
            }
            finally
            {
                stdin.Close();
            }
        }