Ejemplo n.º 1
0
		string SyndicationFeedToString(SyndicationFeed f)
		{
			// try to keep the time here stable so it doesn't trip up the string compare
			f.LastUpdatedTime = FeedLib.FixedChangedDate;

			StringWriter strWriter = new StringWriter();
			using (XmlTextWriter writer = new XmlTextWriter(strWriter))
			{
				writer.Formatting = Formatting.Indented;
				Atom10Serializer serializer = new Atom10Serializer();
				serializer.WriteTo(writer, f);
			}

			return strWriter.ToString();
		}
Ejemplo n.º 2
0
        string SyndicationFeedToString(SyndicationFeed f)
        {
            // try to keep the time here stable so it doesn't trip up the string compare
            f.LastUpdatedTime = FeedLib.FixedChangedDate;

            StringWriter strWriter = new StringWriter();

            using (XmlTextWriter writer = new XmlTextWriter(strWriter))
            {
                writer.Formatting = Formatting.Indented;
                Atom10Serializer serializer = new Atom10Serializer();
                serializer.WriteTo(writer, f);
            }

            return(strWriter.ToString());
        }
Ejemplo n.º 3
0
	public static void DumpFeed(SyndicationFeed f, string label)
	{
		string path = Path.Combine("Test", label);
		f.LastUpdatedTime = FeedLib.FixedChangedDate;

		using (XmlTextWriter writer = new XmlTextWriter(path + ".atom.xml", null))
			{
				Console.WriteLine("Writing " + path + ".atom.xml");
				writer.Formatting = Formatting.Indented;
				Atom10Serializer serializer = new Atom10Serializer();
				serializer.WriteTo(writer, f);
			}

		using (XmlTextWriter writer = new XmlTextWriter(path + ".rss.xml", null))
			{
				Console.WriteLine("Writing " + path + ".rss.xml");
				writer.Formatting = Formatting.Indented;
				Rss20Serializer serializer = new Rss20Serializer();
				serializer.WriteTo(writer, f);
			}
	}