March 16, 2006

More Managed RSS

I have been working on the managed wrapper for the Windows RSS API. The adapter layer is able to pull all the folders, feeds and items across into my object model. This can then be traversed using standard .NET foreach constructs, or even LINQ!
The wrapper is two-way, in that changes made to certain properties are pushed back to the Windows RSS store. I can even add new feeds and folders.
I am also working on the eventing system to receive notifications when the RSS store changes. These events will be pushed up through my model so .NET applications can respond. I'm still working the kinks out of the COM event handlers. I'm not sure if I'm hitting beta bugs, or if my code is wrong…

Here's a little taster of the wrapper in action:

FeedFolder root = FeedFolder.GetRoot();
root.FeedAdded += delegate(object sender, FeedAddedEventArgs e)
{
Console.WriteLine("Feed added: " + e.NewFeed.Url.ToString());
};

foreach (Feed feed in root.AllFeeds)
{
Console.WriteLine(feed.Title);
foreach (Item item in feed.Items)
{
Console.WriteLine(" " + item.Title);

if (item.HasEnclosure)
{
Console.WriteLine(item.Enclosure.LocalPath);
}
}
}


FeedFolder folder = root.AddSubFolder("Hello World");
folder.AddFeed("Me", new Uri("http://blogs.warwick.ac.uk/andrewdavey/?rss=rss_2_0"));

- No comments Not publicly viewable


Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Trackbacks

  1. LINQ demo

    OK - I had to get this quick demo up too:FeedFolder folder = FeedFolder.GetRoot();DateTime yesterday = DateTime.Now.Subtract(TimeSpan.FromDays(1));var allItems = folder.AllFeeds.SelectMany(f ...

    codeMonkey.Weblog(); - 16 Mar 2006, 02:09

Google Ads

Search this blog

Most recent comments

  • I scratched my eye while i was holding some kind of plastic packagi… by Ercan on this entry
  • About a year ago my contacts that i was wearing, i guess were fautl… by Jon on this entry
  • I got shower gel in my eye 4 and a half days ago, and becasue i rub… by Chris on this entry
  • This website may help http://www.webmd.com/eye–health/tc/Eye–In… by S on this entry
  • I somehow got dirt, or debris in my eye. The terrible pain sent me … by Bobbi on this entry

Tags

March 2006

Mo Tu We Th Fr Sa Su
Feb |  Today  | Apr
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31      

Galleries

Blog archive

Loading…
Not signed in
Sign in

Powered by BlogBuilder
© MMXII