Esempio n. 1
0
        public void TestMethod1()
        {
            Geo test = new Geo();

            Channel channel = new Channel();
            channel.title = "Test RSS";
            channel.description = "Test Geo RSS";
            channel.link = "http://www.google.co.uk";

            Item item = new Item();
            item.title = "Test Entry 1";
            item.description = "Bla Bla Bla";
            item.Date = DateTime.Now;
            // 54.898742,-1.398246
            item.AddPoint(54.898742, -1.398246);
            //item.AddPoint(434171, 550112);
            channel.AddItem(item);
            item = new Item();
            item.title = "Test Entry 2";
            item.description = "Lla Lla Lla";
            item.Date = DateTime.Now;
            item.AddPoint(53.456,-1.345);
            //item.AddPoint(434171, 530112);
            channel.AddItem(item);

            test.AddChannel(channel);

            XmlDocument xml = test.ToXML();
            xml.Save("C:\\Temp\\rss.xml");
        }
Esempio n. 2
0
 public void AddChannel(Channel channel)
 {
     if (ChannelList == null)
     {
         ChannelList = new List<Channel>();
     }
     ChannelList.Add(channel);
 }