Common Feed Store Provider

Topics: Developer Forum
Oct 21, 2006 at 9:51 AM
Hi gang,

My FeedStoreProvider (for accessing the IE7 RSS feed store as a drive) is working really nicely now, so if you'll have me I'd like to sign up and contribute the code.

Right now it supports all the general navigation-style commands (cd, dir etc), and I've had a bit of a go at implementing support for rename-item (I can rename a feed from within powershell and IE7 shows the change immediately).

I also implemented a "-unread" parameter for get-childitem, so I can do this:

cd feed:
gci -name -recurse -unread | where {-not $_.PSIsContainer} | ft Title

... and it lists out the title of every item in my feeds that I haven't read.

Eventually I can see lots of neat features in this provider. Implementing new-item to create new feed subscriptions from within powershell, for example. What do you guys think of the idea?
Oct 23, 2006 at 5:36 AM
Mabster, I've added you as a contributor. I would suggest that you create a folder under the Snapin project called "FtpProvider" and then create your types in the "PsCx.Snapin.FtpProvider" namespace. Although if you could wait just a few days that would allow us to get out an alpha release of PSCX.

Oct 23, 2006 at 7:11 AM
FeedStore, Keith, not FTP :)

But I'll hold off for a few days so you can release an alpha.

So ... PsCx.SnapIn.FeedStoreProvider? Do I actually put my provider in the SnapIn namespace? That seems strange.

Currently I have a FeedStoreProviderSnapIn that I'm using to install the provider - will that disappear? I'm assuming that the PsCx project has its own SnapIn.

Also - do you guys have a common place for type and formatting extensions? I have FeedStoreProvider.Types.ps1xml and FeedStoreProvider.Format.ps1xml files that'll need to tag along for the ride.

Oct 23, 2006 at 7:17 AM
I just realised that I have no idea how to get to the source tree. What do you do if you don't have team foundation server?
Oct 23, 2006 at 10:56 AM
Ok, ignore that last comment - I'm all set up now.

Of course, only having Visual C# Express at home kind of limits my ability to build the solution (it won't recognize the setup project).

Anyway - I see how the solution is structured. Looks good. My instinct tells me that my provider code should go somewhere under a "/Providers" folder. It's only a single file, so it could easily live in "/Providers/FeedStoreProvider.cs", but if necessary I could put it in its own "/Providers/FeedStoreProvider" subfolder.

Anyway, I'll hold off doing anything 'til you guys have pushed out an alpha release.

Oct 25, 2006 at 8:38 AM
Well why don't we keep it simple for. Just put your code in a "Providers" folder in the Snapin project. If we get more providers and it gets hard to keep things straight, then we can sub-divide the Providers folder.
Oct 25, 2006 at 8:39 AM
Oh yeah, the Alpha has been released. So have at it. :-)
Oct 25, 2006 at 9:34 AM

First question, then: Where should I put my type and formatting extension files? Here:


or here:


It depends on whether you guys would prefer to keep type and formatting extensions separated for each provider, or have a single place for all of them across the whole project.

What do you think? Either works for me, since the GetTypes and GetFormat method of the snapin returns an array, and hence can easily handle multiple files.
Oct 25, 2006 at 9:42 AM
I'll keep them separate for now, just to get the stuff in there.

Alex - looks like you have the project file checked out. That's cool - I'll check the necessary files in and you can add a reference to 'em at your leisure.

FYI, I am adding the following files to the \Trunk\Src\SnapIn folder:


... and I'll modify the \SnapInInfo.cs file to refer to them.
Oct 25, 2006 at 9:45 AM
(First sign of madness - replying to yourself in a forum over and over again.)

Scratch that. I think it's simplest if the Types.ps1xml and Format.ps1xml files are in the project root, and named PsCx.

The files have to be deployed alongside the snapin DLL, so it's best if the project knows that they live in the same folder IMHO.
Oct 25, 2006 at 10:07 AM
Ok! All necessary files checked in.

I forgot to provide a check-in comment. Sorry about that guys - I'll be more careful in future.

This compiles, and if I copy these files to a folder:


... then run this:

set-alias installutil $env:windir\Microsoft.NET\Framework\v2.0.50727\installutil
installutil PsCx.SnapIn.dll
add-pssnapin PsCx.SnapIn

... I get my "feed:" drive etc.

Since I'm using Visual C# Express here, I can't modify the setup project. Hopefully one of you guys can make it copy the necessary files into the install folder and try it out at your end.

Oct 25, 2006 at 3:56 PM
I'll work on that tonight. Thanks for contributing!
Nov 8, 2006 at 10:29 AM

I noticed your comment in the latest check-in about not installing MSFeeds.DLL. I wasn't sure whether I should have included that DLL in the project or not, but since there was another DLL there I thought I'd add it just in case. You're absolutely right that only IE7 should install that DLL.

Nov 8, 2006 at 9:26 PM
No problem. The VS setup projects have an itchy trigger finger on what dependencies to redistribute. It would have automatically detected msfeeds.dll. You just have to mark those we really shouldn't redist as "Exclude = true".
Dec 26, 2006 at 4:17 AM
This discussion has been copied to Work Item 6795. You may wish to continue further discussion there.