Welcome to MSDN Blogs Sign in | Join | Help

Extending the new TFS Team Members Power Tool

The October release of the Team Foundation Power Tools includes a new feature called "Team Members" that allows you to collaborate with your team even better.  One of the features is integration with instant messaging that allows you to see presence, IM, video, audio, etc from inside Team Explorer.  You can read more about the feature here: http://blogs.msdn.com/bharry/archive/2008/10/01/preview-of-the-next-tfs-power-tools-release.aspx.

One of the key design points of this new IM integration is extensibility.  The Power Tools included providers for Office Communicator and Live Messenger.  However, there are a ton of other IM systems/clients out there and we wanted to make sure no one would be left out in the cold.  As a proof point, one of our MVP's has just announced a new provider for Skype.  You can read about it here: http://msmvps.com/blogs/vstsblog/archive/2008/11/13/skype-collaboration-provider-for-tfs.aspx.  Further, we've created a CodePlex project for people who want to write and share TFS collaboration providers (and the Skype provider will be uploaded shortly).  You'll find the CodePlex project here: http://www.codeplex.com/tfscollab

If you are interested in building a provider, you can look at the Skype example.  I've also included here some basic information on getting started.  I've attached in a zip file that contains the source code for all of the provider interfaces and support code.  You will find 3 files in the zip:

  • Interfaces.cs - The set of interfaces, abstract classes, enums, exceptions and the like that are necessary to write a provider.
  • CollaborationProviderBase.cs - Some base classes that implement portions of the provider interfaces and are likely to be the same regardless of your provider.  You can use them or not.  They may save you a little typing.
  • CollaborationProviderFactory.cs - Code that is used to enumerate available providers and to load them.  You really don't need this code but it might be helpful if you are trying to understand why TFS is not finding your provider.

All of this is in the Microsoft.TeamFoundation.Collaboration.dll that comes with the Power Tool download - you can see them with intellisense, but having some of the comments might be useful.

You start building a provider by creating a class that implements ICollaborationProvider (or inherits from CollaborationProviderBase).  Implementing it will require to you implement a few more classes:

  • A class that derives from Contact for returning information about contacts that your provider knows about.
  • A class that implements IContactGroup (if your provider supports groups of contacts).
  • A class that derives from PhoneNumberCollection and one from PhoneNumber for returning phone numbers for a contact.
  • A class that implements IConversation for returning active conversations.
  • A class that derives from PresenceChangedEventArgs

Once you've built all of the classes you can copy your dll into the PublicAssemblies\CollaborationProviders folder under your Team Explorer installation and TFS will provide it as a choice in the list of available providers.

A few random comments that may help you getting started.

  • Much of the interface is optional (you don't need to implement it).  The big hint is that if you look in CollaborationProviderBase, you will find some methods that are abstract and some that are implemented but throw a NotImplementedException.  You must implement the abstract methods.  You only need to implement the "NotImplementedException" methods if you want to.  I haven't tested this distinction extensively but that's the intent.  Let me know if I missed something.
  • Look at the CollaborationCapability enumeration that is passed to IsSupportedCapability.  This is another good way to tell the consumer about what capability your provider does (or does not) support.
  • ProviderName, ProviderReadiness, IsSupportedCapability, SignIn, AutoSignIn and SignInStatus need to work even when noone is singed in to the provider.
  • Before the rest of the interfaces can be used, the client must successfully sign in with AutoSignIn or SignIn.
  • Team Explorer does a lot of collaboration provider interaction on a background thread and some on a foreground thread - therefore your provider must work for both (and should never block the foreground thread if called on a background thread).
  • Team Explorer will call your provider on multiple threads simultaneously (it needs to be thread safe).
  • Look at the comments in interfaces.cs.  I'm a bit behind on documenting the methods but there's a fair amount in there.  I'll update it when I get a chance.

There's probably more I should tell you.  Feel free to ask questions about anything you run into and I'll update the post as I see more things people are going to want to know.

Brian

Published Thursday, November 13, 2008 10:48 AM by bharry
Attachment(s): CollaborationInterface.zip

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Extending the new TFS Team Members Power Tool

Hi,

I'm very interested in this new collaborative tool. I'm trying to get it work with WLM, but i can't find where Team Members IM are defined ??

Should it be part of User AD info ?

Saturday, November 15, 2008 5:29 AM by Tof

# re: Extending the new TFS Team Members Power Tool

It uses the groups in your TFS project groups: Team -> Team Project Settings -> Groups (or something like that).

You can add AD groups to those groups and that will work too.

There is a menu option when you right click on the Team Project in Team Explorer and click Team Project Settings for configuring which group with be your "team group".  All groups contained in that group will be sub teams and so on.

Brian

Sunday, November 16, 2008 2:34 AM by bharry

# re: Extending the new TFS Team Members Power Tool

Thanks Brian, I already have my team members visible (team & sub team). My question was : where does the WLM collaboration provider plugin take the IM-address ? I found, in my case, that it takes the mail-address from the user AD page. The problem is, my team members have different work-email and IM-account. Is there a solution to link them without creating a new provider ?

Monday, November 17, 2008 4:25 AM by Tof

# re: Extending the new TFS Team Members Power Tool

Thanks Brian - always enjoy your posts. I have a similar question to one posted by Tof - we are using Live Messenger, but each dev has their own "private" signon name (while AD is configured with "corporate" emails). We want to extend the Messenger provider in such a way as to configure the username/password (and save it to some config or registry). It looks like the SignIn() method takes a username and password, but it is unclear when (if at all) this method is called. Any tips?

Monday, November 17, 2008 7:21 AM by Colin

# re: Extending the new TFS Team Members Power Tool

Thanks Brian, I already have my team members visible (team & sub team). My question was : where does the WLM collaboration provider plugin take the IM-address ? I found, in my case, that it takes the mail-address from the user AD page. The problem is, my team members have different work-email and IM-account. Is there a solution to link them without creating a new provider ?

So it seems similar to Colin remark...

Monday, November 17, 2008 12:20 PM by Tof

# re: Extending the new TFS Team Members Power Tool

You are correct.  We use the email address from AD for your IM address.  The issue was that we didn't have any obvious place to put a separate IM address.  Fixing that issue is my #1 priority for our next update (in a couple of months).

Brian

Monday, November 17, 2008 5:14 PM by bharry

# re: Extending the new TFS Team Members Power Tool

Good news! I'm looking forward to this update! Thank you Brian.

Tuesday, November 18, 2008 3:53 AM by Tof

# VSTS Links - 11/18/2008

Patrice Calve on Migrating VSS 2005 to TFS 2008 Ayman Badawi on TFS 2008 Web Services List Brian Harry...

Tuesday, November 18, 2008 9:24 AM by Team System News

# re: Extending the new TFS Team Members Power Tool

Hi Brian,

I tried to implement just a basic "dummy" provider which just tells TeamExplorer that it's capable of all things.

By doing this in IsSupportedCapability, the context menu of TeamExplorer contains several more entries, but all of them are grayed.

I simply return SignedIn in AutoSignIn and SignIn and Running in ProviderReadiness.

Any hints for me? When is "AddContact" called?

Thursday, November 20, 2008 11:27 AM by Achim

# re: Extending the new TFS Team Members Power Tool

Is it possible to extend team member functionality for a NON-IM function? I was thinking of a somthing that would allow members/admins to manage the public info on for each user on the team sharepoint portal

Tuesday, November 25, 2008 1:40 PM by mikeb

# re: Extending the new TFS Team Members Power Tool

There's no specific extensibility in Team Members for this but I can't think of anything you would need.  VS is extensible - you can add menu items and such.  Team Explorer is also extensible - you can find the currently selected node, etc.  You can use the VS SDK to get the info you need to write an add in for Team Explorer.

Brian

Wednesday, November 26, 2008 8:04 AM by bharry

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker